PHP Класс SeoUri

Наследование: extends SeoAppModel
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$displayField string Model Display Field
$hasMany array Has Many Association
$hasOne array Has One Association
$name string Model Name/Alias
$searchFields array Filter fields
$validate array Validation Rules

Открытые методы

Метод Описание
afterSave ( boolean $created, $options = [] ) : boolean Send need approval email if we need it.
beforeSave ( array $options = [] ) : true If saving a regular expression, make sure to mark not approved unless is_approved is specifically being sent in.
findAllRegexUris ( ) : array This is a simple function to return all possible RegEx URIs from the DB (it has to return all of them, since we can't know which it's going to match) So we've wrapped the DB request in a simple cache request, configured by setting the config key cacheEngine
findForViewById ( $id ) : result Named scope to find for view
findIdByUri ( $uri = null ) : mixed Find the URI id by uri
findRegexUri ( string $request = null ) : array Checks an input $request against regex urls
requestMatch ( $request, $uri = null ) : boolean Given a request, see if the uri matches.
sendNotification ( $id = null ) : void Send the notification of a regular expression that needs approval.
setApproved ( $id = null ) : boolean Set as approved
urlEncode ( $id = null ) : boolean Url encode the uri

Описание методов

afterSave() публичный Метод

Send need approval email if we need it.
public afterSave ( boolean $created, $options = [] ) : boolean
$created boolean
Результат boolean

beforeSave() публичный Метод

If saving a regular expression, make sure to mark not approved unless is_approved is specifically being sent in.
public beforeSave ( array $options = [] ) : true
$options array
Результат true

findAllRegexUris() публичный Метод

This is a simple function to return all possible RegEx URIs from the DB (it has to return all of them, since we can't know which it's going to match) So we've wrapped the DB request in a simple cache request, configured by setting the config key cacheEngine
public findAllRegexUris ( ) : array
Результат array $uris array(id => uri)

findForViewById() публичный Метод

Named scope to find for view
public findForViewById ( $id ) : result
Результат result of find.

findIdByUri() публичный Метод

Find the URI id by uri
public findIdByUri ( $uri = null ) : mixed
Результат mixed id

findRegexUri() публичный Метод

Checks an input $request against regex urls
public findRegexUri ( string $request = null ) : array
$request string
Результат array $uri_ids array(id)

requestMatch() публичный Метод

Given a request, see if the uri matches.
public requestMatch ( $request, $uri = null ) : boolean
Результат boolean if request matches the URI given

sendNotification() публичный Метод

Send the notification of a regular expression that needs approval.
public sendNotification ( $id = null ) : void
Результат void

setApproved() публичный Метод

Set as approved
public setApproved ( $id = null ) : boolean
Результат boolean result of save

urlEncode() публичный Метод

Url encode the uri
public urlEncode ( $id = null ) : boolean
Результат boolean success

Описание свойств

$displayField публичное свойство

Model Display Field
public string $displayField
Результат string

$hasMany публичное свойство

Has Many Association
public array $hasMany
Результат array

$hasOne публичное свойство

Has One Association
public array $hasOne
Результат array

$name публичное свойство

Model Name/Alias
public string $name
Результат string

$searchFields публичное свойство

Filter fields
public array $searchFields
Результат array

$validate публичное свойство

Validation Rules
public array $validate
Результат array