Validates the namespace.
public validateNamespace ( string $attribute ) | ||
$attribute | string | Namespace variable. |
/** * 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.'); } }
/** * @inheritdoc */ public function validateNamespace() { if (empty($this->prefixMap)) { parent::validateNamespace(); } }