validateNamespace() public method

Validates the namespace.
public validateNamespace ( string $attribute )
$attribute string Namespace variable.
Esempio n. 1
0
 /**
  * Validates the [[ns]] attribute.
  */
 public function validateNamespace($attribute)
 {
     parent::validateNamespace($attribute);
     $this->ns = ltrim($this->ns, '\\');
     if (false === strpos($this->ns, 'app\\')) {
         $this->addError('ns', '@app namespace must be used.');
     }
 }
Esempio n. 2
0
 /**
  * @inheritdoc
  */
 public function validateNamespace()
 {
     if (empty($this->prefixMap)) {
         parent::validateNamespace();
     }
 }