validate() public method

returns TRUE if path is valid.
public validate ( string $path ) : boolean
$path string
return boolean
Ejemplo n.º 1
0
 /**
  * checks if path is valid.
  *
  * @param string $path         path of route
  * @param string $webspaceKey  key of portal
  * @param string $languageCode
  * @param string $segmentKey
  *
  * @return bool
  */
 public function isValid($path, $webspaceKey, $languageCode, $segmentKey = null)
 {
     return $this->cleaner->validate($path) && $this->mapper->unique($path, $webspaceKey, $languageCode, $segmentKey);
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function isValid($path, $webspaceKey, $languageCode, $segmentKey = null)
 {
     return $path !== '/' && $this->cleaner->validate($path);
 }