Improved docs.
This commit is contained in:
parent
da17482a80
commit
d22211c4b4
|
@ -99,6 +99,7 @@ class Builder implements LoggerAwareInterface
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set up the builder.
|
* Set up the builder.
|
||||||
|
*
|
||||||
* @param \PHPCI\Model\Build $build
|
* @param \PHPCI\Model\Build $build
|
||||||
* @param LoggerInterface $logger
|
* @param LoggerInterface $logger
|
||||||
*/
|
*/
|
||||||
|
@ -130,6 +131,7 @@ class Builder implements LoggerAwareInterface
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the config array, as read from phpci.yml
|
* Set the config array, as read from phpci.yml
|
||||||
|
*
|
||||||
* @param array|null $config
|
* @param array|null $config
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
|
@ -144,6 +146,7 @@ class Builder implements LoggerAwareInterface
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Access a variable from the phpci.yml file.
|
* Access a variable from the phpci.yml file.
|
||||||
|
*
|
||||||
* @param string
|
* @param string
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
|
@ -160,6 +163,7 @@ class Builder implements LoggerAwareInterface
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Access a variable from the config.yml
|
* Access a variable from the config.yml
|
||||||
|
*
|
||||||
* @param $key
|
* @param $key
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
|
@ -259,6 +263,7 @@ class Builder implements LoggerAwareInterface
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find a binary required by a plugin.
|
* Find a binary required by a plugin.
|
||||||
|
*
|
||||||
* @param string $binary
|
* @param string $binary
|
||||||
* @param bool $quiet
|
* @param bool $quiet
|
||||||
*
|
*
|
||||||
|
@ -272,6 +277,7 @@ class Builder implements LoggerAwareInterface
|
||||||
/**
|
/**
|
||||||
* Replace every occurrence of the interpolation vars in the given string
|
* Replace every occurrence of the interpolation vars in the given string
|
||||||
* Example: "This is build %PHPCI_BUILD%" => "This is build 182"
|
* Example: "This is build %PHPCI_BUILD%" => "This is build 182"
|
||||||
|
*
|
||||||
* @param string $input
|
* @param string $input
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
@ -328,6 +334,7 @@ class Builder implements LoggerAwareInterface
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write to the build log.
|
* Write to the build log.
|
||||||
|
*
|
||||||
* @param $message
|
* @param $message
|
||||||
* @param string $level
|
* @param string $level
|
||||||
* @param array $context
|
* @param array $context
|
||||||
|
@ -339,6 +346,7 @@ class Builder implements LoggerAwareInterface
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a success-coloured message to the log.
|
* Add a success-coloured message to the log.
|
||||||
|
*
|
||||||
* @param string
|
* @param string
|
||||||
*/
|
*/
|
||||||
public function logSuccess($message)
|
public function logSuccess($message)
|
||||||
|
@ -348,6 +356,7 @@ class Builder implements LoggerAwareInterface
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a failure-coloured message to the log.
|
* Add a failure-coloured message to the log.
|
||||||
|
*
|
||||||
* @param string $message
|
* @param string $message
|
||||||
* @param \Exception $exception The exception that caused the error.
|
* @param \Exception $exception The exception that caused the error.
|
||||||
*/
|
*/
|
||||||
|
@ -359,6 +368,7 @@ class Builder implements LoggerAwareInterface
|
||||||
* Returns a configured instance of the plugin factory.
|
* Returns a configured instance of the plugin factory.
|
||||||
*
|
*
|
||||||
* @param Build $build
|
* @param Build $build
|
||||||
|
*
|
||||||
* @return PluginFactory
|
* @return PluginFactory
|
||||||
*/
|
*/
|
||||||
private function buildPluginFactory(Build $build)
|
private function buildPluginFactory(Build $build)
|
||||||
|
|
|
@ -12,15 +12,17 @@ namespace PHPCI\Helper;
|
||||||
use b8\Config;
|
use b8\Config;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Login Is Disabled Helper - Checks if login is disalbed in the view
|
* Login Is Disabled Helper - Checks if login is disalbed in the view
|
||||||
* @author Stephen Ball <phpci@stephen.rebelinblue.com>
|
*
|
||||||
* @package PHPCI
|
* @author Stephen Ball <phpci@stephen.rebelinblue.com>
|
||||||
* @subpackage Web
|
* @package PHPCI
|
||||||
*/
|
* @subpackage Web
|
||||||
|
*/
|
||||||
class LoginIsDisabled
|
class LoginIsDisabled
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Checks if
|
* Checks if
|
||||||
|
*
|
||||||
* @param $method
|
* @param $method
|
||||||
* @param array $params
|
* @param array $params
|
||||||
* @return mixed|null
|
* @return mixed|null
|
||||||
|
@ -28,7 +30,7 @@ class LoginIsDisabled
|
||||||
public function __call($method, $params = array())
|
public function __call($method, $params = array())
|
||||||
{
|
{
|
||||||
unset($method, $params);
|
unset($method, $params);
|
||||||
|
|
||||||
$config = Config::getInstance();
|
$config = Config::getInstance();
|
||||||
$state = (bool) $config->get('phpci.authentication_settings.state', false);
|
$state = (bool) $config->get('phpci.authentication_settings.state', false);
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ namespace PHPCI\Helper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class MailerFactory helps to set up and configure a SwiftMailer object.
|
* Class MailerFactory helps to set up and configure a SwiftMailer object.
|
||||||
|
*
|
||||||
* @package PHPCI\Helper
|
* @package PHPCI\Helper
|
||||||
*/
|
*/
|
||||||
class MailerFactory
|
class MailerFactory
|
||||||
|
@ -22,6 +23,7 @@ class MailerFactory
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the mailer factory configuration.
|
* Set the mailer factory configuration.
|
||||||
|
*
|
||||||
* @param array $config
|
* @param array $config
|
||||||
*/
|
*/
|
||||||
public function __construct($config = array())
|
public function __construct($config = array())
|
||||||
|
@ -34,7 +36,8 @@ class MailerFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an instance of Swift_Mailer based on the config.s
|
* Returns an instance of Swift_Mailer based on the config.
|
||||||
|
*
|
||||||
* @return \Swift_Mailer
|
* @return \Swift_Mailer
|
||||||
*/
|
*/
|
||||||
public function getSwiftMailerFromConfig()
|
public function getSwiftMailerFromConfig()
|
||||||
|
@ -61,7 +64,9 @@ class MailerFactory
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a specific configuration value by key.
|
* Return a specific configuration value by key.
|
||||||
|
*
|
||||||
* @param $configName
|
* @param $configName
|
||||||
|
*
|
||||||
* @return null|string
|
* @return null|string
|
||||||
*/
|
*/
|
||||||
public function getMailConfig($configName)
|
public function getMailConfig($configName)
|
||||||
|
@ -70,7 +75,6 @@ class MailerFactory
|
||||||
return $this->emailConfig[$configName];
|
return $this->emailConfig[$configName];
|
||||||
} else {
|
} else {
|
||||||
// Check defaults
|
// Check defaults
|
||||||
|
|
||||||
switch($configName) {
|
switch($configName) {
|
||||||
case 'smtp_address':
|
case 'smtp_address':
|
||||||
return "localhost";
|
return "localhost";
|
||||||
|
|
|
@ -12,6 +12,7 @@ session_start();
|
||||||
|
|
||||||
require_once(__DIR__ . '/../bootstrap.php');
|
require_once(__DIR__ . '/../bootstrap.php');
|
||||||
|
|
||||||
|
/** @var PHPCI\Application */
|
||||||
$app = $container->get('application');
|
$app = $container->get('application');
|
||||||
|
|
||||||
print $app->handleRequest();
|
print $app->handleRequest();
|
||||||
|
|
Loading…
Reference in a new issue