PHP Class SeoUri

Inheritance: extends SeoAppModel
Datei anzeigen Open project: webtechnick/cakephp-seo-plugin

Public Properties

Property Type Description
$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

Public Methods

Method Description
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

Method Details

afterSave() public method

Send need approval email if we need it.
public afterSave ( boolean $created, $options = [] ) : boolean
$created boolean
return boolean

beforeSave() public method

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
return true

findAllRegexUris() public method

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
return array $uris array(id => uri)

findForViewById() public method

Named scope to find for view
public findForViewById ( $id ) : result
return result of find.

findIdByUri() public method

Find the URI id by uri
public findIdByUri ( $uri = null ) : mixed
return mixed id

findRegexUri() public method

Checks an input $request against regex urls
public findRegexUri ( string $request = null ) : array
$request string
return array $uri_ids array(id)

requestMatch() public method

Given a request, see if the uri matches.
public requestMatch ( $request, $uri = null ) : boolean
return boolean if request matches the URI given

sendNotification() public method

Send the notification of a regular expression that needs approval.
public sendNotification ( $id = null ) : void
return void

setApproved() public method

Set as approved
public setApproved ( $id = null ) : boolean
return boolean result of save

urlEncode() public method

Url encode the uri
public urlEncode ( $id = null ) : boolean
return boolean success

Property Details

$displayField public_oe property

Model Display Field
public string $displayField
return string

$hasMany public_oe property

Has Many Association
public array $hasMany
return array

$hasOne public_oe property

Has One Association
public array $hasOne
return array

$name public_oe property

Model Name/Alias
public string $name
return string

$searchFields public_oe property

Filter fields
public array $searchFields
return array

$validate public_oe property

Validation Rules
public array $validate
return array