Overview

Namespaces

  • Charcoal
    • App
      • Action
      • Config
      • Handler
      • Middleware
      • Module
      • Route
      • Script
      • ServiceProvider
      • Template

Classes

  • Charcoal\App\Action\AbstractAction
  • Charcoal\App\App
  • Charcoal\App\AppConfig
  • Charcoal\App\AppContainer
  • Charcoal\App\Config\CacheConfig
  • Charcoal\App\Config\DatabaseConfig
  • Charcoal\App\Config\FilesystemConfig
  • Charcoal\App\Config\LoggerConfig
  • Charcoal\App\Config\MemcacheCacheConfig
  • Charcoal\App\Config\MemcacheCacheServerConfig
  • Charcoal\App\Handler\AbstractHandler
  • Charcoal\App\Handler\Error
  • Charcoal\App\Handler\HandlerConfig
  • Charcoal\App\Handler\NotAllowed
  • Charcoal\App\Handler\NotFound
  • Charcoal\App\Handler\PhpError
  • Charcoal\App\Handler\Shutdown
  • Charcoal\App\Middleware\CacheMiddleware
  • Charcoal\App\Module\AbstractModule
  • Charcoal\App\Module\ModuleConfig
  • Charcoal\App\Module\ModuleManager
  • Charcoal\App\Route\ActionRoute
  • Charcoal\App\Route\ActionRouteConfig
  • Charcoal\App\Route\RouteConfig
  • Charcoal\App\Route\RouteManager
  • Charcoal\App\Route\ScriptRoute
  • Charcoal\App\Route\ScriptRouteConfig
  • Charcoal\App\Route\TemplateRoute
  • Charcoal\App\Route\TemplateRouteConfig
  • Charcoal\App\Script\AbstractScript
  • Charcoal\App\ServiceProvider\AppServiceProvider
  • Charcoal\App\ServiceProvider\CacheServiceProvider
  • Charcoal\App\ServiceProvider\DatabaseServiceProvider
  • Charcoal\App\ServiceProvider\FilesystemServiceProvider
  • Charcoal\App\ServiceProvider\LoggerServiceProvider
  • Charcoal\App\ServiceProvider\ViewServiceProvider
  • Charcoal\App\Template\AbstractTemplate
  • Charcoal\App\Template\AbstractWidget
  • Charcoal\App\Template\WidgetBuilder

Interfaces

  • Charcoal\App\Action\ActionInterface
  • Charcoal\App\AppAwareInterface
  • Charcoal\App\Handler\HandlerInterface
  • Charcoal\App\Module\ModuleInterface
  • Charcoal\App\Route\RouteInterface
  • Charcoal\App\Script\CronScriptInterface
  • Charcoal\App\Script\ScriptInterface
  • Charcoal\App\Template\TemplateInterface
  • Charcoal\App\Template\WidgetInterface

Traits

  • Charcoal\App\AppAwareTrait
  • Charcoal\App\CallableResolverAwareTrait
  • Charcoal\App\Script\ArgScriptTrait
  • Charcoal\App\Script\CronScriptTrait
  • Charcoal\App\Script\PathScriptTrait
  • Overview
  • Namespace
  • Class
  1: <?php
  2: 
  3: namespace Charcoal\App\Config;
  4: 
  5: // Local parent namespace dependencies
  6: use \Charcoal\Config\AbstractConfig;
  7: 
  8: /**
  9:  * Memcache Cache Server Config
 10:  *
 11:  * Defines a memcache server configuration.
 12:  */
 13: class MemcacheCacheServerConfig extends AbstractConfig
 14: {
 15:     /**
 16:      * @var string $host
 17:      */
 18:     public $host;
 19:     /**
 20:      * @var integer $port
 21:      */
 22:     public $port;
 23:     /**
 24:      * @var boolean $persistent
 25:      */
 26:     public $persistent;
 27:     /**
 28:      * @var integer $weight
 29:      */
 30:     public $weight;
 31: 
 32:     /**
 33:      * @return array
 34:      */
 35:     public function defaults()
 36:     {
 37:         $defaults = [
 38:             'host'       => 'localhost',
 39:             'port'       => 11211,
 40:             'persistent' => true,
 41:             'weight'     => 1
 42:         ];
 43: 
 44:         $defaults = array_merge(parent::defaults(), $defaults);
 45:         return $defaults;
 46:     }
 47: 
 48:     /**
 49:      * @param string $host The memcache server host.
 50:      * @return MemcacheCacheServerConfig Chainable.
 51:      */
 52:     public function setHost($host)
 53:     {
 54:         $this->host = $host;
 55:         return $this;
 56:     }
 57: 
 58:     /**
 59:      * @return string
 60:      */
 61:     public function host()
 62:     {
 63:         return $this->host;
 64:     }
 65: 
 66:     /**
 67:      * @param integer $port The memcache server port.
 68:      * @return MemcacheCacheServerConfig Chainable
 69:      */
 70:     public function setPort($port)
 71:     {
 72:         $this->port = $port;
 73:         return $this;
 74:     }
 75: 
 76:     /**
 77:      * @return integer
 78:      */
 79:     public function port()
 80:     {
 81:         return $this->port;
 82:     }
 83: 
 84:     /**
 85:      * @param boolean $persistent The persistent flag.
 86:      * @return MemcacheCacheServerConfig Chainable
 87:      */
 88:     public function setPersistent($persistent)
 89:     {
 90:         $this->persistent = $persistent;
 91:         return $this;
 92:     }
 93: 
 94:     /**
 95:      * @return boolean
 96:      */
 97:     public function persistent()
 98:     {
 99:         return $this->persistent;
100:     }
101: 
102:     /**
103:      * @param integer $weight The weight of this server, relative to other's weight.
104:      * @return MemcacheCacheServerConfig Chainable
105:      */
106:     public function setWeight($weight)
107:     {
108:         $this->weight = $weight;
109:         return $this;
110:     }
111: 
112:     /**
113:      * @return integer
114:      */
115:     public function weight()
116:     {
117:         return $this->weight;
118:     }
119: }
120: 
API documentation generated by ApiGen