code
stringlengths 17
247k
| docstring
stringlengths 30
30.3k
| func_name
stringlengths 1
89
| language
stringclasses 1
value | repo
stringlengths 7
63
| path
stringlengths 7
153
| url
stringlengths 51
209
| license
stringclasses 4
values |
---|---|---|---|---|---|---|---|
public function evidenceLevel($evidenceLevel)
{
return $this->setProperty('evidenceLevel', $evidenceLevel);
} | Strength of evidence of the data used to formulate the guideline
(enumerated).
@param \Spatie\SchemaOrg\Contracts\MedicalEvidenceLevelContract|\Spatie\SchemaOrg\Contracts\MedicalEvidenceLevelContract[] $evidenceLevel
@return static
@see https://schema.org/evidenceLevel
@see https://health-lifesci.schema.org | evidenceLevel | php | spatie/schema-org | src/MedicalGuideline.php | https://github.com/spatie/schema-org/blob/master/src/MedicalGuideline.php | MIT |
public function evidenceOrigin($evidenceOrigin)
{
return $this->setProperty('evidenceOrigin', $evidenceOrigin);
} | Source of the data used to formulate the guidance, e.g. RCT, consensus
opinion, etc.
@param string|string[] $evidenceOrigin
@return static
@see https://schema.org/evidenceOrigin
@see https://health-lifesci.schema.org | evidenceOrigin | php | spatie/schema-org | src/MedicalGuideline.php | https://github.com/spatie/schema-org/blob/master/src/MedicalGuideline.php | MIT |
public function guidelineDate($guidelineDate)
{
return $this->setProperty('guidelineDate', $guidelineDate);
} | Date on which this guideline's recommendation was made.
@param \DateTimeInterface|\DateTimeInterface[] $guidelineDate
@return static
@see https://schema.org/guidelineDate
@see https://health-lifesci.schema.org | guidelineDate | php | spatie/schema-org | src/MedicalGuideline.php | https://github.com/spatie/schema-org/blob/master/src/MedicalGuideline.php | MIT |
public function guidelineSubject($guidelineSubject)
{
return $this->setProperty('guidelineSubject', $guidelineSubject);
} | The medical conditions, treatments, etc. that are the subject of the
guideline.
@param \Spatie\SchemaOrg\Contracts\MedicalEntityContract|\Spatie\SchemaOrg\Contracts\MedicalEntityContract[] $guidelineSubject
@return static
@see https://schema.org/guidelineSubject
@see https://health-lifesci.schema.org | guidelineSubject | php | spatie/schema-org | src/MedicalGuideline.php | https://github.com/spatie/schema-org/blob/master/src/MedicalGuideline.php | MIT |
public function acceptedOffer($acceptedOffer)
{
return $this->setProperty('acceptedOffer', $acceptedOffer);
} | The offer(s) -- e.g., product, quantity and price combinations --
included in the order.
@param \Spatie\SchemaOrg\Contracts\OfferContract|\Spatie\SchemaOrg\Contracts\OfferContract[] $acceptedOffer
@return static
@see https://schema.org/acceptedOffer | acceptedOffer | php | spatie/schema-org | src/Order.php | https://github.com/spatie/schema-org/blob/master/src/Order.php | MIT |
public function billingAddress($billingAddress)
{
return $this->setProperty('billingAddress', $billingAddress);
} | The billing address for the order.
@param \Spatie\SchemaOrg\Contracts\PostalAddressContract|\Spatie\SchemaOrg\Contracts\PostalAddressContract[] $billingAddress
@return static
@see https://schema.org/billingAddress | billingAddress | php | spatie/schema-org | src/Order.php | https://github.com/spatie/schema-org/blob/master/src/Order.php | MIT |
public function broker($broker)
{
return $this->setProperty('broker', $broker);
} | An entity that arranges for an exchange between a buyer and a seller. In
most cases a broker never acquires or releases ownership of a product or
service involved in an exchange. If it is not clear whether an entity is
a broker, seller, or buyer, the latter two terms are preferred.
@param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $broker
@return static
@see https://schema.org/broker | broker | php | spatie/schema-org | src/Order.php | https://github.com/spatie/schema-org/blob/master/src/Order.php | MIT |
public function confirmationNumber($confirmationNumber)
{
return $this->setProperty('confirmationNumber', $confirmationNumber);
} | A number that confirms the given order or payment has been received.
@param string|string[] $confirmationNumber
@return static
@see https://schema.org/confirmationNumber | confirmationNumber | php | spatie/schema-org | src/Order.php | https://github.com/spatie/schema-org/blob/master/src/Order.php | MIT |
public function customer($customer)
{
return $this->setProperty('customer', $customer);
} | Party placing the order or paying the invoice.
@param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $customer
@return static
@see https://schema.org/customer | customer | php | spatie/schema-org | src/Order.php | https://github.com/spatie/schema-org/blob/master/src/Order.php | MIT |
public function discount($discount)
{
return $this->setProperty('discount', $discount);
} | Any discount applied (to an Order).
@param float|float[]|int|int[]|string|string[] $discount
@return static
@see https://schema.org/discount | discount | php | spatie/schema-org | src/Order.php | https://github.com/spatie/schema-org/blob/master/src/Order.php | MIT |
public function discountCode($discountCode)
{
return $this->setProperty('discountCode', $discountCode);
} | Code used to redeem a discount.
@param string|string[] $discountCode
@return static
@see https://schema.org/discountCode | discountCode | php | spatie/schema-org | src/Order.php | https://github.com/spatie/schema-org/blob/master/src/Order.php | MIT |
public function discountCurrency($discountCurrency)
{
return $this->setProperty('discountCurrency', $discountCurrency);
} | The currency of the discount.
Use standard formats: [ISO 4217 currency
format](http://en.wikipedia.org/wiki/ISO_4217), e.g. "USD"; [Ticker
symbol](https://en.wikipedia.org/wiki/List_of_cryptocurrencies) for
cryptocurrencies, e.g. "BTC"; well known names for [Local Exchange
Trading
Systems](https://en.wikipedia.org/wiki/Local_exchange_trading_system)
(LETS) and other currency types, e.g. "Ithaca HOUR".
@param string|string[] $discountCurrency
@return static
@see https://schema.org/discountCurrency | discountCurrency | php | spatie/schema-org | src/Order.php | https://github.com/spatie/schema-org/blob/master/src/Order.php | MIT |
public function isGift($isGift)
{
return $this->setProperty('isGift', $isGift);
} | Indicates whether the offer was accepted as a gift for someone other than
the buyer.
@param bool|bool[] $isGift
@return static
@see https://schema.org/isGift | isGift | php | spatie/schema-org | src/Order.php | https://github.com/spatie/schema-org/blob/master/src/Order.php | MIT |
public function merchant($merchant)
{
return $this->setProperty('merchant', $merchant);
} | 'merchant' is an out-dated term for 'seller'.
@param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $merchant
@return static
@see https://schema.org/merchant | merchant | php | spatie/schema-org | src/Order.php | https://github.com/spatie/schema-org/blob/master/src/Order.php | MIT |
public function orderDelivery($orderDelivery)
{
return $this->setProperty('orderDelivery', $orderDelivery);
} | The delivery of the parcel related to this order or order item.
@param \Spatie\SchemaOrg\Contracts\ParcelDeliveryContract|\Spatie\SchemaOrg\Contracts\ParcelDeliveryContract[] $orderDelivery
@return static
@see https://schema.org/orderDelivery | orderDelivery | php | spatie/schema-org | src/Order.php | https://github.com/spatie/schema-org/blob/master/src/Order.php | MIT |
public function orderNumber($orderNumber)
{
return $this->setProperty('orderNumber', $orderNumber);
} | The identifier of the transaction.
@param string|string[] $orderNumber
@return static
@see https://schema.org/orderNumber | orderNumber | php | spatie/schema-org | src/Order.php | https://github.com/spatie/schema-org/blob/master/src/Order.php | MIT |
public function orderStatus($orderStatus)
{
return $this->setProperty('orderStatus', $orderStatus);
} | The current status of the order.
@param \Spatie\SchemaOrg\Contracts\OrderStatusContract|\Spatie\SchemaOrg\Contracts\OrderStatusContract[] $orderStatus
@return static
@see https://schema.org/orderStatus | orderStatus | php | spatie/schema-org | src/Order.php | https://github.com/spatie/schema-org/blob/master/src/Order.php | MIT |
public function partOfInvoice($partOfInvoice)
{
return $this->setProperty('partOfInvoice', $partOfInvoice);
} | The order is being paid as part of the referenced Invoice.
@param \Spatie\SchemaOrg\Contracts\InvoiceContract|\Spatie\SchemaOrg\Contracts\InvoiceContract[] $partOfInvoice
@return static
@see https://schema.org/partOfInvoice | partOfInvoice | php | spatie/schema-org | src/Order.php | https://github.com/spatie/schema-org/blob/master/src/Order.php | MIT |
public function paymentMethod($paymentMethod)
{
return $this->setProperty('paymentMethod', $paymentMethod);
} | The name of the credit card or other method of payment for the order.
@param \Spatie\SchemaOrg\Contracts\PaymentMethodContract|\Spatie\SchemaOrg\Contracts\PaymentMethodContract[]|string|string[] $paymentMethod
@return static
@see https://schema.org/paymentMethod
@link https://github.com/schemaorg/schemaorg/issues/3537 | paymentMethod | php | spatie/schema-org | src/Order.php | https://github.com/spatie/schema-org/blob/master/src/Order.php | MIT |
public function paymentMethodId($paymentMethodId)
{
return $this->setProperty('paymentMethodId', $paymentMethodId);
} | An identifier for the method of payment used (e.g. the last 4 digits of
the credit card).
@param string|string[] $paymentMethodId
@return static
@see https://schema.org/paymentMethodId | paymentMethodId | php | spatie/schema-org | src/Order.php | https://github.com/spatie/schema-org/blob/master/src/Order.php | MIT |
public function paymentUrl($paymentUrl)
{
return $this->setProperty('paymentUrl', $paymentUrl);
} | The URL for sending a payment.
@param string|string[] $paymentUrl
@return static
@see https://schema.org/paymentUrl | paymentUrl | php | spatie/schema-org | src/Order.php | https://github.com/spatie/schema-org/blob/master/src/Order.php | MIT |
public function seller($seller)
{
return $this->setProperty('seller', $seller);
} | An entity which offers (sells / leases / lends / loans) the services /
goods. A seller may also be a provider.
@param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $seller
@return static
@see https://schema.org/seller | seller | php | spatie/schema-org | src/Order.php | https://github.com/spatie/schema-org/blob/master/src/Order.php | MIT |
public function subtitleLanguage($subtitleLanguage)
{
return $this->setProperty('subtitleLanguage', $subtitleLanguage);
} | Languages in which subtitles/captions are available, in [IETF BCP 47
standard format](http://tools.ietf.org/html/bcp47).
@param \Spatie\SchemaOrg\Contracts\LanguageContract|\Spatie\SchemaOrg\Contracts\LanguageContract[]|string|string[] $subtitleLanguage
@return static
@see https://schema.org/subtitleLanguage
@see https://pending.schema.org
@link https://github.com/schemaorg/schemaorg/issues/2110 | subtitleLanguage | php | spatie/schema-org | src/Movie.php | https://github.com/spatie/schema-org/blob/master/src/Movie.php | MIT |
public function titleEIDR($titleEIDR)
{
return $this->setProperty('titleEIDR', $titleEIDR);
} | An [EIDR](https://eidr.org/) (Entertainment Identifier Registry)
[[identifier]] representing at the most general/abstract level, a work of
film or television.
For example, the motion picture known as "Ghostbusters" has a titleEIDR
of "10.5240/7EC7-228A-510A-053E-CBB8-J". This title (or work) may have
several variants, which EIDR calls "edits". See [[editEIDR]].
Since schema.org types like [[Movie]], [[TVEpisode]], [[TVSeason]], and
[[TVSeries]] can be used for both works and their multiple expressions,
it is possible to use [[titleEIDR]] alone (for a general description), or
alongside [[editEIDR]] for a more edit-specific description.
@param string|string[] $titleEIDR
@return static
@see https://schema.org/titleEIDR
@see https://pending.schema.org
@link https://github.com/schemaorg/schemaorg/issues/2469 | titleEIDR | php | spatie/schema-org | src/Movie.php | https://github.com/spatie/schema-org/blob/master/src/Movie.php | MIT |
public function priceCurrency($priceCurrency)
{
return $this->setProperty('priceCurrency', $priceCurrency);
} | The currency of the price, or a price component when attached to
[[PriceSpecification]] and its subtypes.
Use standard formats: [ISO 4217 currency
format](http://en.wikipedia.org/wiki/ISO_4217), e.g. "USD"; [Ticker
symbol](https://en.wikipedia.org/wiki/List_of_cryptocurrencies) for
cryptocurrencies, e.g. "BTC"; well known names for [Local Exchange
Trading
Systems](https://en.wikipedia.org/wiki/Local_exchange_trading_system)
(LETS) and other currency types, e.g. "Ithaca HOUR".
@param string|string[] $priceCurrency
@return static
@see https://schema.org/priceCurrency | priceCurrency | php | spatie/schema-org | src/BuyAction.php | https://github.com/spatie/schema-org/blob/master/src/BuyAction.php | MIT |
public function priceSpecification($priceSpecification)
{
return $this->setProperty('priceSpecification', $priceSpecification);
} | One or more detailed price specifications, indicating the unit price and
delivery or payment charges.
@param \Spatie\SchemaOrg\Contracts\PriceSpecificationContract|\Spatie\SchemaOrg\Contracts\PriceSpecificationContract[] $priceSpecification
@return static
@see https://schema.org/priceSpecification | priceSpecification | php | spatie/schema-org | src/BuyAction.php | https://github.com/spatie/schema-org/blob/master/src/BuyAction.php | MIT |
public function vendor($vendor)
{
return $this->setProperty('vendor', $vendor);
} | 'vendor' is an earlier term for 'seller'.
@param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $vendor
@return static
@see https://schema.org/vendor | vendor | php | spatie/schema-org | src/BuyAction.php | https://github.com/spatie/schema-org/blob/master/src/BuyAction.php | MIT |
public function warrantyPromise($warrantyPromise)
{
return $this->setProperty('warrantyPromise', $warrantyPromise);
} | The warranty promise(s) included in the offer.
@param \Spatie\SchemaOrg\Contracts\WarrantyPromiseContract|\Spatie\SchemaOrg\Contracts\WarrantyPromiseContract[] $warrantyPromise
@return static
@see https://schema.org/warrantyPromise | warrantyPromise | php | spatie/schema-org | src/BuyAction.php | https://github.com/spatie/schema-org/blob/master/src/BuyAction.php | MIT |
public function area($area)
{
return $this->setProperty('area', $area);
} | The area within which users can expect to reach the broadcast service.
@param \Spatie\SchemaOrg\Contracts\PlaceContract|\Spatie\SchemaOrg\Contracts\PlaceContract[] $area
@return static
@see https://schema.org/area | area | php | spatie/schema-org | src/BroadcastService.php | https://github.com/spatie/schema-org/blob/master/src/BroadcastService.php | MIT |
public function availableChannel($availableChannel)
{
return $this->setProperty('availableChannel', $availableChannel);
} | A means of accessing the service (e.g. a phone bank, a web site, a
location, etc.).
@param \Spatie\SchemaOrg\Contracts\ServiceChannelContract|\Spatie\SchemaOrg\Contracts\ServiceChannelContract[] $availableChannel
@return static
@see https://schema.org/availableChannel | availableChannel | php | spatie/schema-org | src/BroadcastService.php | https://github.com/spatie/schema-org/blob/master/src/BroadcastService.php | MIT |
public function broadcastAffiliateOf($broadcastAffiliateOf)
{
return $this->setProperty('broadcastAffiliateOf', $broadcastAffiliateOf);
} | The media network(s) whose content is broadcast on this station.
@param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[] $broadcastAffiliateOf
@return static
@see https://schema.org/broadcastAffiliateOf | broadcastAffiliateOf | php | spatie/schema-org | src/BroadcastService.php | https://github.com/spatie/schema-org/blob/master/src/BroadcastService.php | MIT |
public function broadcastDisplayName($broadcastDisplayName)
{
return $this->setProperty('broadcastDisplayName', $broadcastDisplayName);
} | The name displayed in the channel guide. For many US affiliates, it is
the network name.
@param string|string[] $broadcastDisplayName
@return static
@see https://schema.org/broadcastDisplayName | broadcastDisplayName | php | spatie/schema-org | src/BroadcastService.php | https://github.com/spatie/schema-org/blob/master/src/BroadcastService.php | MIT |
public function broadcastTimezone($broadcastTimezone)
{
return $this->setProperty('broadcastTimezone', $broadcastTimezone);
} | The timezone in [ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)
for which the service bases its broadcasts.
@param string|string[] $broadcastTimezone
@return static
@see https://schema.org/broadcastTimezone | broadcastTimezone | php | spatie/schema-org | src/BroadcastService.php | https://github.com/spatie/schema-org/blob/master/src/BroadcastService.php | MIT |
public function broadcaster($broadcaster)
{
return $this->setProperty('broadcaster', $broadcaster);
} | The organization owning or operating the broadcast service.
@param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[] $broadcaster
@return static
@see https://schema.org/broadcaster | broadcaster | php | spatie/schema-org | src/BroadcastService.php | https://github.com/spatie/schema-org/blob/master/src/BroadcastService.php | MIT |
public function callSign($callSign)
{
return $this->setProperty('callSign', $callSign);
} | A [callsign](https://en.wikipedia.org/wiki/Call_sign), as used in
broadcasting and radio communications to identify people, radio and TV
stations, or vehicles.
@param string|string[] $callSign
@return static
@see https://schema.org/callSign
@see https://pending.schema.org
@link https://github.com/schemaorg/schemaorg/issues/2109 | callSign | php | spatie/schema-org | src/BroadcastService.php | https://github.com/spatie/schema-org/blob/master/src/BroadcastService.php | MIT |
public function category($category)
{
return $this->setProperty('category', $category);
} | A category for the item. Greater signs or slashes can be used to
informally indicate a category hierarchy.
@param \Spatie\SchemaOrg\Contracts\CategoryCodeContract|\Spatie\SchemaOrg\Contracts\CategoryCodeContract[]|\Spatie\SchemaOrg\Contracts\PhysicalActivityCategoryContract|\Spatie\SchemaOrg\Contracts\PhysicalActivityCategoryContract[]|\Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[]|string|string[] $category
@return static
@see https://schema.org/category | category | php | spatie/schema-org | src/BroadcastService.php | https://github.com/spatie/schema-org/blob/master/src/BroadcastService.php | MIT |
public function hasBroadcastChannel($hasBroadcastChannel)
{
return $this->setProperty('hasBroadcastChannel', $hasBroadcastChannel);
} | A broadcast channel of a broadcast service.
@param \Spatie\SchemaOrg\Contracts\BroadcastChannelContract|\Spatie\SchemaOrg\Contracts\BroadcastChannelContract[] $hasBroadcastChannel
@return static
@see https://schema.org/hasBroadcastChannel
@link https://github.com/schemaorg/schemaorg/issues/1004 | hasBroadcastChannel | php | spatie/schema-org | src/BroadcastService.php | https://github.com/spatie/schema-org/blob/master/src/BroadcastService.php | MIT |
public function hoursAvailable($hoursAvailable)
{
return $this->setProperty('hoursAvailable', $hoursAvailable);
} | The hours during which this service or contact is available.
@param \Spatie\SchemaOrg\Contracts\OpeningHoursSpecificationContract|\Spatie\SchemaOrg\Contracts\OpeningHoursSpecificationContract[] $hoursAvailable
@return static
@see https://schema.org/hoursAvailable | hoursAvailable | php | spatie/schema-org | src/BroadcastService.php | https://github.com/spatie/schema-org/blob/master/src/BroadcastService.php | MIT |
public function isRelatedTo($isRelatedTo)
{
return $this->setProperty('isRelatedTo', $isRelatedTo);
} | A pointer to another, somehow related product (or multiple products).
@param \Spatie\SchemaOrg\Contracts\ProductContract|\Spatie\SchemaOrg\Contracts\ProductContract[]|\Spatie\SchemaOrg\Contracts\ServiceContract|\Spatie\SchemaOrg\Contracts\ServiceContract[] $isRelatedTo
@return static
@see https://schema.org/isRelatedTo | isRelatedTo | php | spatie/schema-org | src/BroadcastService.php | https://github.com/spatie/schema-org/blob/master/src/BroadcastService.php | MIT |
public function isSimilarTo($isSimilarTo)
{
return $this->setProperty('isSimilarTo', $isSimilarTo);
} | A pointer to another, functionally similar product (or multiple
products).
@param \Spatie\SchemaOrg\Contracts\ProductContract|\Spatie\SchemaOrg\Contracts\ProductContract[]|\Spatie\SchemaOrg\Contracts\ServiceContract|\Spatie\SchemaOrg\Contracts\ServiceContract[] $isSimilarTo
@return static
@see https://schema.org/isSimilarTo | isSimilarTo | php | spatie/schema-org | src/BroadcastService.php | https://github.com/spatie/schema-org/blob/master/src/BroadcastService.php | MIT |
public function parentService($parentService)
{
return $this->setProperty('parentService', $parentService);
} | A broadcast service to which the broadcast service may belong to such as
regional variations of a national channel.
@param \Spatie\SchemaOrg\Contracts\BroadcastServiceContract|\Spatie\SchemaOrg\Contracts\BroadcastServiceContract[] $parentService
@return static
@see https://schema.org/parentService | parentService | php | spatie/schema-org | src/BroadcastService.php | https://github.com/spatie/schema-org/blob/master/src/BroadcastService.php | MIT |
public function produces($produces)
{
return $this->setProperty('produces', $produces);
} | The tangible thing generated by the service, e.g. a passport, permit,
etc.
@param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $produces
@return static
@see https://schema.org/produces | produces | php | spatie/schema-org | src/BroadcastService.php | https://github.com/spatie/schema-org/blob/master/src/BroadcastService.php | MIT |
public function providerMobility($providerMobility)
{
return $this->setProperty('providerMobility', $providerMobility);
} | Indicates the mobility of a provided service (e.g. 'static', 'dynamic').
@param string|string[] $providerMobility
@return static
@see https://schema.org/providerMobility | providerMobility | php | spatie/schema-org | src/BroadcastService.php | https://github.com/spatie/schema-org/blob/master/src/BroadcastService.php | MIT |
public function serviceAudience($serviceAudience)
{
return $this->setProperty('serviceAudience', $serviceAudience);
} | The audience eligible for this service.
@param \Spatie\SchemaOrg\Contracts\AudienceContract|\Spatie\SchemaOrg\Contracts\AudienceContract[] $serviceAudience
@return static
@see https://schema.org/serviceAudience | serviceAudience | php | spatie/schema-org | src/BroadcastService.php | https://github.com/spatie/schema-org/blob/master/src/BroadcastService.php | MIT |
public function serviceOutput($serviceOutput)
{
return $this->setProperty('serviceOutput', $serviceOutput);
} | The tangible thing generated by the service, e.g. a passport, permit,
etc.
@param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $serviceOutput
@return static
@see https://schema.org/serviceOutput | serviceOutput | php | spatie/schema-org | src/BroadcastService.php | https://github.com/spatie/schema-org/blob/master/src/BroadcastService.php | MIT |
public function serviceType($serviceType)
{
return $this->setProperty('serviceType', $serviceType);
} | The type of service being offered, e.g. veterans' benefits, emergency
relief, etc.
@param \Spatie\SchemaOrg\Contracts\GovernmentBenefitsTypeContract|\Spatie\SchemaOrg\Contracts\GovernmentBenefitsTypeContract[]|string|string[] $serviceType
@return static
@see https://schema.org/serviceType | serviceType | php | spatie/schema-org | src/BroadcastService.php | https://github.com/spatie/schema-org/blob/master/src/BroadcastService.php | MIT |
public function termsOfService($termsOfService)
{
return $this->setProperty('termsOfService', $termsOfService);
} | Human-readable terms of service documentation.
@param string|string[] $termsOfService
@return static
@see https://schema.org/termsOfService
@see https://pending.schema.org
@link https://github.com/schemaorg/schemaorg/issues/1423 | termsOfService | php | spatie/schema-org | src/BroadcastService.php | https://github.com/spatie/schema-org/blob/master/src/BroadcastService.php | MIT |
public function videoFormat($videoFormat)
{
return $this->setProperty('videoFormat', $videoFormat);
} | The type of screening or video broadcast used (e.g. IMAX, 3D, SD, HD,
etc.).
@param string|string[] $videoFormat
@return static
@see https://schema.org/videoFormat | videoFormat | php | spatie/schema-org | src/BroadcastService.php | https://github.com/spatie/schema-org/blob/master/src/BroadcastService.php | MIT |
public function byArtist($byArtist)
{
return $this->setProperty('byArtist', $byArtist);
} | The artist that performed this album or recording.
@param \Spatie\SchemaOrg\Contracts\MusicGroupContract|\Spatie\SchemaOrg\Contracts\MusicGroupContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $byArtist
@return static
@see https://schema.org/byArtist | byArtist | php | spatie/schema-org | src/MusicRecording.php | https://github.com/spatie/schema-org/blob/master/src/MusicRecording.php | MIT |
public function inAlbum($inAlbum)
{
return $this->setProperty('inAlbum', $inAlbum);
} | The album to which this recording belongs.
@param \Spatie\SchemaOrg\Contracts\MusicAlbumContract|\Spatie\SchemaOrg\Contracts\MusicAlbumContract[] $inAlbum
@return static
@see https://schema.org/inAlbum | inAlbum | php | spatie/schema-org | src/MusicRecording.php | https://github.com/spatie/schema-org/blob/master/src/MusicRecording.php | MIT |
public function inPlaylist($inPlaylist)
{
return $this->setProperty('inPlaylist', $inPlaylist);
} | The playlist to which this recording belongs.
@param \Spatie\SchemaOrg\Contracts\MusicPlaylistContract|\Spatie\SchemaOrg\Contracts\MusicPlaylistContract[] $inPlaylist
@return static
@see https://schema.org/inPlaylist | inPlaylist | php | spatie/schema-org | src/MusicRecording.php | https://github.com/spatie/schema-org/blob/master/src/MusicRecording.php | MIT |
public function isrcCode($isrcCode)
{
return $this->setProperty('isrcCode', $isrcCode);
} | The International Standard Recording Code for the recording.
@param string|string[] $isrcCode
@return static
@see https://schema.org/isrcCode | isrcCode | php | spatie/schema-org | src/MusicRecording.php | https://github.com/spatie/schema-org/blob/master/src/MusicRecording.php | MIT |
public function recordingOf($recordingOf)
{
return $this->setProperty('recordingOf', $recordingOf);
} | The composition this track is a recording of.
@param \Spatie\SchemaOrg\Contracts\MusicCompositionContract|\Spatie\SchemaOrg\Contracts\MusicCompositionContract[] $recordingOf
@return static
@see https://schema.org/recordingOf | recordingOf | php | spatie/schema-org | src/MusicRecording.php | https://github.com/spatie/schema-org/blob/master/src/MusicRecording.php | MIT |
public function healthPlanNetworkId($healthPlanNetworkId)
{
return $this->setProperty('healthPlanNetworkId', $healthPlanNetworkId);
} | Name or unique ID of network. (Networks are often reused across different
insurance plans.)
@param string|string[] $healthPlanNetworkId
@return static
@see https://schema.org/healthPlanNetworkId
@see https://pending.schema.org
@link https://github.com/schemaorg/schemaorg/issues/1062 | healthPlanNetworkId | php | spatie/schema-org | src/Pharmacy.php | https://github.com/spatie/schema-org/blob/master/src/Pharmacy.php | MIT |
public function isAcceptingNewPatients($isAcceptingNewPatients)
{
return $this->setProperty('isAcceptingNewPatients', $isAcceptingNewPatients);
} | Whether the provider is accepting new patients.
@param bool|bool[] $isAcceptingNewPatients
@return static
@see https://schema.org/isAcceptingNewPatients
@see https://pending.schema.org
@link https://github.com/schemaorg/schemaorg/issues/1062 | isAcceptingNewPatients | php | spatie/schema-org | src/Pharmacy.php | https://github.com/spatie/schema-org/blob/master/src/Pharmacy.php | MIT |
public function medicalSpecialty($medicalSpecialty)
{
return $this->setProperty('medicalSpecialty', $medicalSpecialty);
} | A medical specialty of the provider.
@param \Spatie\SchemaOrg\Contracts\MedicalSpecialtyContract|\Spatie\SchemaOrg\Contracts\MedicalSpecialtyContract[] $medicalSpecialty
@return static
@see https://schema.org/medicalSpecialty
@see https://health-lifesci.schema.org | medicalSpecialty | php | spatie/schema-org | src/Pharmacy.php | https://github.com/spatie/schema-org/blob/master/src/Pharmacy.php | MIT |
public function carrier($carrier)
{
return $this->setProperty('carrier', $carrier);
} | 'carrier' is an out-dated term indicating the 'provider' for parcel
delivery and flights.
@param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[] $carrier
@return static
@see https://schema.org/carrier | carrier | php | spatie/schema-org | src/ParcelDelivery.php | https://github.com/spatie/schema-org/blob/master/src/ParcelDelivery.php | MIT |
public function deliveryStatus($deliveryStatus)
{
return $this->setProperty('deliveryStatus', $deliveryStatus);
} | New entry added as the package passes through each leg of its journey
(from shipment to final delivery).
@param \Spatie\SchemaOrg\Contracts\DeliveryEventContract|\Spatie\SchemaOrg\Contracts\DeliveryEventContract[] $deliveryStatus
@return static
@see https://schema.org/deliveryStatus | deliveryStatus | php | spatie/schema-org | src/ParcelDelivery.php | https://github.com/spatie/schema-org/blob/master/src/ParcelDelivery.php | MIT |
public function expectedArrivalFrom($expectedArrivalFrom)
{
return $this->setProperty('expectedArrivalFrom', $expectedArrivalFrom);
} | The earliest date the package may arrive.
@param \DateTimeInterface|\DateTimeInterface[] $expectedArrivalFrom
@return static
@see https://schema.org/expectedArrivalFrom | expectedArrivalFrom | php | spatie/schema-org | src/ParcelDelivery.php | https://github.com/spatie/schema-org/blob/master/src/ParcelDelivery.php | MIT |
public function expectedArrivalUntil($expectedArrivalUntil)
{
return $this->setProperty('expectedArrivalUntil', $expectedArrivalUntil);
} | The latest date the package may arrive.
@param \DateTimeInterface|\DateTimeInterface[] $expectedArrivalUntil
@return static
@see https://schema.org/expectedArrivalUntil | expectedArrivalUntil | php | spatie/schema-org | src/ParcelDelivery.php | https://github.com/spatie/schema-org/blob/master/src/ParcelDelivery.php | MIT |
public function hasDeliveryMethod($hasDeliveryMethod)
{
return $this->setProperty('hasDeliveryMethod', $hasDeliveryMethod);
} | Method used for delivery or shipping.
@param \Spatie\SchemaOrg\Contracts\DeliveryMethodContract|\Spatie\SchemaOrg\Contracts\DeliveryMethodContract[] $hasDeliveryMethod
@return static
@see https://schema.org/hasDeliveryMethod | hasDeliveryMethod | php | spatie/schema-org | src/ParcelDelivery.php | https://github.com/spatie/schema-org/blob/master/src/ParcelDelivery.php | MIT |
public function partOfOrder($partOfOrder)
{
return $this->setProperty('partOfOrder', $partOfOrder);
} | The overall order the items in this delivery were included in.
@param \Spatie\SchemaOrg\Contracts\OrderContract|\Spatie\SchemaOrg\Contracts\OrderContract[] $partOfOrder
@return static
@see https://schema.org/partOfOrder | partOfOrder | php | spatie/schema-org | src/ParcelDelivery.php | https://github.com/spatie/schema-org/blob/master/src/ParcelDelivery.php | MIT |
public function trackingUrl($trackingUrl)
{
return $this->setProperty('trackingUrl', $trackingUrl);
} | Tracking url for the parcel delivery.
@param string|string[] $trackingUrl
@return static
@see https://schema.org/trackingUrl | trackingUrl | php | spatie/schema-org | src/ParcelDelivery.php | https://github.com/spatie/schema-org/blob/master/src/ParcelDelivery.php | MIT |
public function bookingAgent($bookingAgent)
{
return $this->setProperty('bookingAgent', $bookingAgent);
} | 'bookingAgent' is an out-dated term indicating a 'broker' that serves as
a booking agent.
@param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $bookingAgent
@return static
@see https://schema.org/bookingAgent | bookingAgent | php | spatie/schema-org | src/EventReservation.php | https://github.com/spatie/schema-org/blob/master/src/EventReservation.php | MIT |
public function bookingTime($bookingTime)
{
return $this->setProperty('bookingTime', $bookingTime);
} | The date and time the reservation was booked.
@param \DateTimeInterface|\DateTimeInterface[] $bookingTime
@return static
@see https://schema.org/bookingTime | bookingTime | php | spatie/schema-org | src/EventReservation.php | https://github.com/spatie/schema-org/blob/master/src/EventReservation.php | MIT |
public function modifiedTime($modifiedTime)
{
return $this->setProperty('modifiedTime', $modifiedTime);
} | The date and time the reservation was modified.
@param \DateTimeInterface|\DateTimeInterface[] $modifiedTime
@return static
@see https://schema.org/modifiedTime | modifiedTime | php | spatie/schema-org | src/EventReservation.php | https://github.com/spatie/schema-org/blob/master/src/EventReservation.php | MIT |
public function programMembershipUsed($programMembershipUsed)
{
return $this->setProperty('programMembershipUsed', $programMembershipUsed);
} | Any membership in a frequent flyer, hotel loyalty program, etc. being
applied to the reservation.
@param \Spatie\SchemaOrg\Contracts\ProgramMembershipContract|\Spatie\SchemaOrg\Contracts\ProgramMembershipContract[] $programMembershipUsed
@return static
@see https://schema.org/programMembershipUsed | programMembershipUsed | php | spatie/schema-org | src/EventReservation.php | https://github.com/spatie/schema-org/blob/master/src/EventReservation.php | MIT |
public function reservationFor($reservationFor)
{
return $this->setProperty('reservationFor', $reservationFor);
} | The thing -- flight, event, restaurant, etc. being reserved.
@param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $reservationFor
@return static
@see https://schema.org/reservationFor | reservationFor | php | spatie/schema-org | src/EventReservation.php | https://github.com/spatie/schema-org/blob/master/src/EventReservation.php | MIT |
public function reservationId($reservationId)
{
return $this->setProperty('reservationId', $reservationId);
} | A unique identifier for the reservation.
@param string|string[] $reservationId
@return static
@see https://schema.org/reservationId | reservationId | php | spatie/schema-org | src/EventReservation.php | https://github.com/spatie/schema-org/blob/master/src/EventReservation.php | MIT |
public function reservationStatus($reservationStatus)
{
return $this->setProperty('reservationStatus', $reservationStatus);
} | The current status of the reservation.
@param \Spatie\SchemaOrg\Contracts\ReservationStatusTypeContract|\Spatie\SchemaOrg\Contracts\ReservationStatusTypeContract[] $reservationStatus
@return static
@see https://schema.org/reservationStatus | reservationStatus | php | spatie/schema-org | src/EventReservation.php | https://github.com/spatie/schema-org/blob/master/src/EventReservation.php | MIT |
public function reservedTicket($reservedTicket)
{
return $this->setProperty('reservedTicket', $reservedTicket);
} | A ticket associated with the reservation.
@param \Spatie\SchemaOrg\Contracts\TicketContract|\Spatie\SchemaOrg\Contracts\TicketContract[] $reservedTicket
@return static
@see https://schema.org/reservedTicket | reservedTicket | php | spatie/schema-org | src/EventReservation.php | https://github.com/spatie/schema-org/blob/master/src/EventReservation.php | MIT |
public function totalPrice($totalPrice)
{
return $this->setProperty('totalPrice', $totalPrice);
} | The total price for the reservation or ticket, including applicable
taxes, shipping, etc.
Usage guidelines:
* Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT
NINE' (U+0039)) rather than superficially similar Unicode symbols.
* Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a
decimal point. Avoid using these symbols as a readability separator.
@param \Spatie\SchemaOrg\Contracts\PriceSpecificationContract|\Spatie\SchemaOrg\Contracts\PriceSpecificationContract[]|float|float[]|int|int[]|string|string[] $totalPrice
@return static
@see https://schema.org/totalPrice | totalPrice | php | spatie/schema-org | src/EventReservation.php | https://github.com/spatie/schema-org/blob/master/src/EventReservation.php | MIT |
public function underName($underName)
{
return $this->setProperty('underName', $underName);
} | The person or organization the reservation or ticket is for.
@param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $underName
@return static
@see https://schema.org/underName | underName | php | spatie/schema-org | src/EventReservation.php | https://github.com/spatie/schema-org/blob/master/src/EventReservation.php | MIT |
public function __construct(
protected RedisManager $redis,
protected Repository $config,
) {
//
} | Create a new Redis Ingest instance. | __construct | php | laravel/pulse | src/Ingests/RedisIngest.php | https://github.com/laravel/pulse/blob/master/src/Ingests/RedisIngest.php | MIT |
public function __construct(protected Storage $storage)
{
//
} | Create a new Storage Ingest instance. | __construct | php | laravel/pulse | src/Ingests/StorageIngest.php | https://github.com/laravel/pulse/blob/master/src/Ingests/StorageIngest.php | MIT |
public function __construct(protected Gate $gate)
{
//
} | Create a new middleware instance. | __construct | php | laravel/pulse | src/Http/Middleware/Authorize.php | https://github.com/laravel/pulse/blob/master/src/Http/Middleware/Authorize.php | MIT |
public function dehydrate()
{
if (Livewire::isLivewireRequest()) {
return;
}
Pulse::css($this->css());
} | Capture component-specific CSS.
@return void | dehydrate | php | laravel/pulse | src/Livewire/Card.php | https://github.com/laravel/pulse/blob/master/src/Livewire/Card.php | MIT |
protected function css()
{
return null;
} | Define any CSS that should be loaded for the component.
@return string|\Illuminate\Contracts\Support\Htmlable|array<int, string|\Illuminate\Contracts\Support\Htmlable>|null | css | php | laravel/pulse | src/Livewire/Card.php | https://github.com/laravel/pulse/blob/master/src/Livewire/Card.php | MIT |
public function __construct(
protected DatabaseManager $db,
protected Repository $config,
) {
//
} | Create a new Database storage instance. | __construct | php | laravel/pulse | src/Storage/DatabaseStorage.php | https://github.com/laravel/pulse/blob/master/src/Storage/DatabaseStorage.php | MIT |
public function __construct(
protected CacheManager $cache,
protected ConfigRepository $config,
) {
//
} | Create a new cache connection resolver instance. | __construct | php | laravel/pulse | src/Support/CacheStoreResolver.php | https://github.com/laravel/pulse/blob/master/src/Support/CacheStoreResolver.php | MIT |
public function __construct(
protected Pulse $pulse,
protected Repository $config,
) {
//
} | Create a new recorder instance. | __construct | php | laravel/pulse | src/Recorders/SlowQueries.php | https://github.com/laravel/pulse/blob/master/src/Recorders/SlowQueries.php | MIT |
public function actionError()
{
if($error=Yii::app()->errorHandler->error)
{
if(Yii::app()->request->isAjaxRequest)
echo $error['message'];
else
$this->render('error', $error);
}
} | This is the action to handle external exceptions. | actionError | php | yiisoft/yii | demos/blog/protected/controllers/SiteController.php | https://github.com/yiisoft/yii/blob/master/demos/blog/protected/controllers/SiteController.php | BSD-3-Clause |
public function actionLogout()
{
Yii::app()->user->logout();
$this->redirect(Yii::app()->homeUrl);
} | Logs out the current user and redirect to homepage. | actionLogout | php | yiisoft/yii | demos/blog/protected/controllers/SiteController.php | https://github.com/yiisoft/yii/blob/master/demos/blog/protected/controllers/SiteController.php | BSD-3-Clause |
public function accessRules()
{
return array(
array('allow', // allow all users to access 'index' and 'view' actions.
'actions'=>array('index','view'),
'users'=>array('*'),
),
array('allow', // allow authenticated users to access all actions
'users'=>array('@'),
),
array('deny', // deny all users
'users'=>array('*'),
),
);
} | Specifies the access control rules.
This method is used by the 'accessControl' filter.
@return array access control rules | accessRules | php | yiisoft/yii | demos/blog/protected/controllers/PostController.php | https://github.com/yiisoft/yii/blob/master/demos/blog/protected/controllers/PostController.php | BSD-3-Clause |
public function actionCreate()
{
$model=new Post;
if(isset($_POST['Post']))
{
$model->attributes=$_POST['Post'];
if($model->save())
$this->redirect(array('view','id'=>$model->id));
}
$this->render('create',array(
'model'=>$model,
));
} | Creates a new model.
If creation is successful, the browser will be redirected to the 'view' page. | actionCreate | php | yiisoft/yii | demos/blog/protected/controllers/PostController.php | https://github.com/yiisoft/yii/blob/master/demos/blog/protected/controllers/PostController.php | BSD-3-Clause |
public function actionUpdate()
{
$model=$this->loadModel();
if(isset($_POST['Post']))
{
$model->attributes=$_POST['Post'];
if($model->save())
$this->redirect(array('view','id'=>$model->id));
}
$this->render('update',array(
'model'=>$model,
));
} | Updates a particular model.
If update is successful, the browser will be redirected to the 'view' page. | actionUpdate | php | yiisoft/yii | demos/blog/protected/controllers/PostController.php | https://github.com/yiisoft/yii/blob/master/demos/blog/protected/controllers/PostController.php | BSD-3-Clause |
public function actionDelete()
{
if(Yii::app()->request->isPostRequest)
{
// we only allow deletion via POST request
$this->loadModel()->delete();
// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
if(!isset($_GET['ajax']))
$this->redirect(array('index'));
}
else
throw new CHttpException(400,'Invalid request. Please do not repeat this request again.');
} | Deletes a particular model.
If deletion is successful, the browser will be redirected to the 'index' page. | actionDelete | php | yiisoft/yii | demos/blog/protected/controllers/PostController.php | https://github.com/yiisoft/yii/blob/master/demos/blog/protected/controllers/PostController.php | BSD-3-Clause |
public function actionSuggestTags()
{
if(isset($_GET['q']) && ($keyword=trim($_GET['q']))!=='')
{
$tags=Tag::model()->suggestTags($keyword);
if($tags!==array())
echo implode("\n",$tags);
}
} | Suggests tags based on the current user input.
This is called via AJAX when the user is entering the tags input. | actionSuggestTags | php | yiisoft/yii | demos/blog/protected/controllers/PostController.php | https://github.com/yiisoft/yii/blob/master/demos/blog/protected/controllers/PostController.php | BSD-3-Clause |
public function loadModel()
{
if($this->_model===null)
{
if(isset($_GET['id']))
{
if(Yii::app()->user->isGuest)
$condition='status='.Post::STATUS_PUBLISHED.' OR status='.Post::STATUS_ARCHIVED;
else
$condition='';
$this->_model=Post::model()->findByPk($_GET['id'], $condition);
}
if($this->_model===null)
throw new CHttpException(404,'The requested page does not exist.');
}
return $this->_model;
} | Returns the data model based on the primary key given in the GET variable.
If the data model is not found, an HTTP exception will be raised. | loadModel | php | yiisoft/yii | demos/blog/protected/controllers/PostController.php | https://github.com/yiisoft/yii/blob/master/demos/blog/protected/controllers/PostController.php | BSD-3-Clause |
protected function newComment($post)
{
$comment=new Comment;
if(isset($_POST['ajax']) && $_POST['ajax']==='comment-form')
{
echo CActiveForm::validate($comment);
Yii::app()->end();
}
if(isset($_POST['Comment']))
{
$comment->attributes=$_POST['Comment'];
if($post->addComment($comment))
{
if($comment->status==Comment::STATUS_PENDING)
Yii::app()->user->setFlash('commentSubmitted','Thank you for your comment. Your comment will be posted once it is approved.');
$this->refresh();
}
}
return $comment;
} | Creates a new comment.
This method attempts to create a new comment based on the user input.
If the comment is successfully created, the browser will be redirected
to show the created comment.
@param Post the post that the new comment belongs to
@return Comment the comment instance | newComment | php | yiisoft/yii | demos/blog/protected/controllers/PostController.php | https://github.com/yiisoft/yii/blob/master/demos/blog/protected/controllers/PostController.php | BSD-3-Clause |
public function actionApprove()
{
if(Yii::app()->request->isPostRequest)
{
$comment=$this->loadModel();
$comment->approve();
$this->redirect(array('index'));
}
else
throw new CHttpException(400,'Invalid request. Please do not repeat this request again.');
} | Approves a particular comment.
If approval is successful, the browser will be redirected to the comment index page. | actionApprove | php | yiisoft/yii | demos/blog/protected/controllers/CommentController.php | https://github.com/yiisoft/yii/blob/master/demos/blog/protected/controllers/CommentController.php | BSD-3-Clause |
public function rules()
{
return array(
// name, email, subject and body are required
array('name, email, subject, body', 'required'),
// email has to be a valid email address
array('email', 'email'),
// verifyCode needs to be entered correctly
array('verifyCode', 'captcha', 'allowEmpty'=>!CCaptcha::checkRequirements()),
);
} | Declares the validation rules. | rules | php | yiisoft/yii | demos/blog/protected/models/ContactForm.php | https://github.com/yiisoft/yii/blob/master/demos/blog/protected/models/ContactForm.php | BSD-3-Clause |
public function attributeLabels()
{
return array(
'verifyCode'=>'Verification Code',
);
} | Declares customized attribute labels.
If not declared here, an attribute would have a label that is
the same as its name with the first letter in upper case. | attributeLabels | php | yiisoft/yii | demos/blog/protected/models/ContactForm.php | https://github.com/yiisoft/yii/blob/master/demos/blog/protected/models/ContactForm.php | BSD-3-Clause |
public static function model($className=__CLASS__)
{
return parent::model($className);
} | Returns the static model of the specified AR class.
@return static the static model class | model | php | yiisoft/yii | demos/blog/protected/models/Tag.php | https://github.com/yiisoft/yii/blob/master/demos/blog/protected/models/Tag.php | BSD-3-Clause |
public function findTagWeights($limit=20)
{
$models=$this->findAll(array(
'order'=>'frequency DESC',
'limit'=>$limit,
));
$total=0;
foreach($models as $model)
$total+=$model->frequency;
$tags=array();
if($total>0)
{
foreach($models as $model)
$tags[$model->name]=8+(int)(16*$model->frequency/($total+10));
ksort($tags);
}
return $tags;
} | Returns tag names and their corresponding weights.
Only the tags with the top weights will be returned.
@param integer the maximum number of tags that should be returned
@return array weights indexed by tag names. | findTagWeights | php | yiisoft/yii | demos/blog/protected/models/Tag.php | https://github.com/yiisoft/yii/blob/master/demos/blog/protected/models/Tag.php | BSD-3-Clause |
protected function beforeSave()
{
if(parent::beforeSave())
{
if($this->isNewRecord)
$this->create_time=time();
return true;
}
else
return false;
} | This is invoked before the record is saved.
@return boolean whether the record should be saved. | beforeSave | php | yiisoft/yii | demos/blog/protected/models/Comment.php | https://github.com/yiisoft/yii/blob/master/demos/blog/protected/models/Comment.php | BSD-3-Clause |
public static function items($type)
{
if(!isset(self::$_items[$type]))
self::loadItems($type);
return self::$_items[$type];
} | Returns the items for the specified type.
@param string item type (e.g. 'PostStatus').
@return array item names indexed by item code. The items are order by their position values.
An empty array is returned if the item type does not exist. | items | php | yiisoft/yii | demos/blog/protected/models/Lookup.php | https://github.com/yiisoft/yii/blob/master/demos/blog/protected/models/Lookup.php | BSD-3-Clause |
public static function item($type,$code)
{
if(!isset(self::$_items[$type]))
self::loadItems($type);
return isset(self::$_items[$type][$code]) ? self::$_items[$type][$code] : false;
} | Returns the item name for the specified type and code.
@param string the item type (e.g. 'PostStatus').
@param integer the item code (corresponding to the 'code' column value)
@return string the item name for the specified the code. False is returned if the item type or code does not exist. | item | php | yiisoft/yii | demos/blog/protected/models/Lookup.php | https://github.com/yiisoft/yii/blob/master/demos/blog/protected/models/Lookup.php | BSD-3-Clause |
private static function loadItems($type)
{
self::$_items[$type]=array();
$models=self::model()->findAll(array(
'condition'=>'type=:type',
'params'=>array(':type'=>$type),
'order'=>'position',
));
foreach($models as $model)
self::$_items[$type][$model->code]=$model->name;
} | Loads the lookup items for the specified type from the database.
@param string the item type | loadItems | php | yiisoft/yii | demos/blog/protected/models/Lookup.php | https://github.com/yiisoft/yii/blob/master/demos/blog/protected/models/Lookup.php | BSD-3-Clause |
public function rules()
{
return array(
// username and password are required
array('username, password', 'required'),
// rememberMe needs to be a boolean
array('rememberMe', 'boolean'),
// password needs to be authenticated
array('password', 'authenticate'),
);
} | Declares the validation rules.
The rules state that username and password are required,
and password needs to be authenticated. | rules | php | yiisoft/yii | demos/blog/protected/models/LoginForm.php | https://github.com/yiisoft/yii/blob/master/demos/blog/protected/models/LoginForm.php | BSD-3-Clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.