Components_Pear_Environment::provideChannel PHP Méthode

provideChannel() public méthode

Ensure the specified channel exists within the install location.
public provideChannel ( string $channel, array $options = [], string $reason = '' ) : null
$channel string The channel name.
$options array Install options.
$reason string Optional reason for adding the channel.
Résultat null
    public function provideChannel($channel, $options = array(), $reason = '')
    {
        if (!$this->channelExists($channel)) {
            $this->addChannel($channel, $options, $reason);
        }
    }

Usage Example

Exemple #1
0
 /**
  * Install the channel of this component in the environment.
  *
  * @param Components_Pear_Environment $env     The environment to install
  *                                             into.
  * @param array                       $options Install options.
  *
  * @return NULL
  */
 public function installChannel(Components_Pear_Environment $env, $options = array())
 {
     $channel = $this->getChannel();
     if (!empty($channel)) {
         $env->provideChannel($channel, $options, sprintf(' [required by %s]', $this->getName()));
     }
 }
All Usage Examples Of Components_Pear_Environment::provideChannel