/** * Filter an action by tags * * {@inheritDoc} * * @param Action $action {@inheritDoc} * * @return boolean {@inheritDoc} */ public function filter(Action $action) { if ($action instanceof Action) { return $action->hasTags($this->tags); } else { return false; } }
/** * {@inheritDoc} * * {@inheitDoc} * * @param string $dirPath Path to the directory to be secured * @param string|string[] $users Associative array of passwords with usernames * as keys. Can also be a single username. If no password is provided for a * user, one will be generated automatically. Array can represent a user with * no password as either `'username' => null` or simply `'username'` (with no * associative key). (default: `array('admin' => null)`) * @param string $htpasswdFilePath Path to the `.htpasswd` file to be created/ * updated. If no path is provided, the `.htpasswd` file will be created in * the protected directory (not best practice). (default: empty string) * @param array $prerequisites {@inheritDoc} * @param array $tags {@inheritDoc} */ public function __construct($dirPath, $users = array('admin' => null), $htpasswdFilePath = '', $prerequisites = array(), $tags = array()) { parent::__construct($prerequisites, $tags); $this->setDirPath($dirPath); $this->setUsers($users); $this->setHtpasswdFilePath($htpasswdFilePath); }
/** * Construct an Action * * @param string $xmlStringOrFilePath Either a literal XML configuration string * or the path to an XML file * @param array $prerequisites (default: array()) * @param array $tags (default: array()) * @return void */ public function __construct($xmlStringOrFilePath, $prerequisites = array(), $tags = array()) { parent::__construct($prerequisites, $tags); $this->setXMLStringOrFilePath($xmlStringOrFilePath); }
/** * {@inheritDoc} * * {@inheritDoc} * * @param string|SandboxReplaceableData $path The path to the data within * the sandbox (e.g. `'/config/secrets.xml'`) * @param array $prerequisites {@inheritDoc} * @param array $tags {@inheritDoc} */ public function __construct($path, $prerequisites = array(), $tags = array()) { parent::__construct($prerequisites, $tags); $this->setPath($path); }
/** * {@inheritDoc} * * {@inheritDoc} * * @param \mysqli $mysqli MySQL connection information * @param string $schema A schema file path string or a literal MySQL schema * query string. * @param array $prerequisites {@inheritDoc} * @param array $tags {@inheritDoc} */ public function __construct($mysqli, $schema, $prerequisites = array(), $tags = array()) { parent::__construct($prerequisites, $tags); $this->setMySQLi($mysqli); $this->setSchema($schema); }