Ejemplo n.º 1
0
 /**
  * Construct an instance of a Dashboard.
  *
  * @param Application $application
  */
 public function __construct(Application $application)
 {
     parent::__construct();
     $this->application = $application;
     $this->modules = [];
     $this->failedModules = [];
 }
Ejemplo n.º 2
0
 /**
  * Construct an instance of a SpecFactory.
  */
 public function __construct()
 {
     parent::__construct();
     $this->constraints = new ArrayMap();
     $this->defaults = new ArrayMap();
     $this->required = new ArrayList();
 }
Ejemplo n.º 3
0
 /**
  * Construct an instance of a SpecResult.
  *
  * @param string[] $missing
  * @param array[] $failed
  * @param string $status
  */
 public function __construct($missing = [], $failed = [], $status = 'fail')
 {
     parent::__construct();
     $this->missing = $missing;
     $this->failed = $failed;
     $this->status = $status;
 }
Ejemplo n.º 4
0
 /**
  * Construct a new instance of SpecGraphNodeFactory.
  *
  * @param string|null $name
  */
 public function __construct($name = null)
 {
     parent::__construct();
     $this->name = $name;
     $this->dependencies = [];
     $this->spec = null;
 }
Ejemplo n.º 5
0
 /**
  * Construct an instance of a DropdownFactory.
  */
 public function __construct()
 {
     parent::__construct();
     $this->hash = Str::random();
     $this->options = [];
     $this->right = false;
 }
Ejemplo n.º 6
0
 /**
  * Construct an instance of a Flick.
  *
  * @param array|ArrayAccess|Traversable $functions
  * @param string $default
  *
  * @throws InvalidArgumentException
  * @throws LackOfCoffeeException
  */
 public function __construct($functions, $default = 'default')
 {
     parent::__construct();
     Arguments::define(Boa::lst(), Boa::either(Boa::string(), Boa::integer()))->check($functions, $default);
     $this->functions = $functions;
     $this->default = $default;
 }
Ejemplo n.º 7
0
 /**
  * Construct an instance of an API response.
  *
  * @param mixed $content
  * @param string $status
  * @param array $messages
  */
 public function __construct($content, $status = 'success', $messages = [])
 {
     parent::__construct();
     Arguments::define(Boa::arr(), Boa::in($this->getValidStatuses()), Boa::arr())->check($content, $status, $messages);
     $this->content = $content;
     $this->status = $status;
     $this->messages = $messages;
 }
Ejemplo n.º 8
0
 /**
  * Construct an instance of a ResourceMethod.
  *
  * @param string $method
  * @param string $verb
  * @param string $path
  */
 public function __construct($method, $verb, $path)
 {
     parent::__construct();
     Arguments::define(Boa::string(), Boa::string(), Boa::string())->check($method, $verb, $path);
     $this->method = $method;
     $this->verb = $verb;
     $this->path = $path;
 }
Ejemplo n.º 9
0
 /**
  * Construct an instance of a CallExpectation.
  *
  * @param string $methodName
  * @param array $arguments
  * @param mixed|null $return
  * @param int $times
  * 
  * @throws LackOfCoffeeException
  */
 public function __construct($methodName, array $arguments, $return = null, $times = 1)
 {
     parent::__construct();
     $this->methodName = $methodName;
     $this->arguments = $arguments;
     $this->return = $return;
     $this->times = $times;
 }
Ejemplo n.º 10
0
 /**
  * Construct an instance of a Node.
  *
  * @param string $tagName
  * @param string[] $attributes
  * @param string|RenderableInterface|string[]|RenderableInterface[] $content
  * @param bool $selfClosing
  */
 public function __construct($tagName, $attributes, $content, $selfClosing = false)
 {
     parent::__construct();
     $this->tagName = $tagName;
     $this->attributes = array_merge($this->getDefaultAttributes(), $attributes);
     $this->content = $content;
     $this->selfClosing = $selfClosing;
     $this->spec = new Spec();
 }
Ejemplo n.º 11
0
 /**
  * Construct an instance of a Method.
  *
  * @param string $name
  * @param string $controllerClassName
  * @param string $controllerMethodName
  * @param string $verb
  *
  * @throws LackOfCoffeeException
  */
 public function __construct($name, $controllerClassName, $controllerMethodName, $verb = 'GET')
 {
     parent::__construct();
     $this->name = $name;
     $this->verb = $verb;
     $this->controllerClassName = $controllerClassName;
     $this->controllerMethodName = $controllerMethodName;
     $this->label = null;
     $this->hidden = false;
 }
Ejemplo n.º 12
0
 /**
  * Construct an instance of a SpecGraph.
  */
 public function __construct()
 {
     parent::__construct();
     $this->nodes = [];
     $this->incomingEdges = [];
     $this->pending = [];
     $this->checked = [];
     $this->results = [];
     $this->failed = false;
 }
Ejemplo n.º 13
0
 /**
  * Construct an instance of a StyleInliner.
  *
  * @param array $stylesheets
  * @param array $options
  */
 public function __construct(array $stylesheets, array $options = null)
 {
     parent::__construct();
     $this->stylesheetPaths = $stylesheets;
     $this->options = $options;
     if (is_null($this->options)) {
         $this->options = ['cleanup' => false, 'use_inline_styles_block' => false, 'strip_original_tags' => false, 'exclude_media_queries' => false];
     }
     $this->internalInliner = new CssToInlineStyles();
     $this->configure();
 }
Ejemplo n.º 14
0
 /**
  * Construct an instance of a ResourceFactory.
  *
  * @param string $controller
  *
  * @throws LackOfCoffeeException
  * @throws InvalidArgumentException
  */
 public function __construct($controller)
 {
     parent::__construct();
     Arguments::define(Boa::string())->check($controller);
     $this->controller = $controller;
     $this->middleware = [];
     $this->methods = [];
     $this->prefix = null;
     $this->name = 'Unknown';
     $this->description = 'This resource does not provide a description.';
 }
Ejemplo n.º 15
0
 /**
  * Construct an instance of a AwesomeIcon.
  *
  * @param string $icon
  * @param int $size
  * @param bool $spin
  */
 public function __construct($icon, $size = 0, $spin = false)
 {
     parent::__construct();
     $this->icon = $icon;
     $this->size = $size;
     $this->spin = $spin;
     $this->fixedWidth = false;
     $this->list = false;
     $this->bordered = false;
     $this->pull = null;
     $this->rotation = 0;
     $this->flip = null;
 }
Ejemplo n.º 16
0
 /**
  * Construct an instance of a RequestFactory.
  */
 public function __construct()
 {
     parent::__construct();
     $this->method = HttpMethods::GET;
     $this->headers = [];
     $this->request = [];
     $this->query = [];
     $this->uri = '/';
     $this->parameters = [];
     $this->cookies = [];
     $this->files = [];
     $this->server = [];
     $this->content = '';
 }
Ejemplo n.º 17
0
 /**
  * Construct an instance of a Spec.
  *
  * @param array[]|AbstractConstraint[] $constraints
  * @param array $defaults
  * @param array $required
  */
 public function __construct(array $constraints = [], array $defaults = [], array $required = [])
 {
     parent::__construct();
     $annotations = ArrayMap::zero();
     $annotations = ArrayMap::of($constraints)->foldlWithKeys(function (ArrayMap $acc, $key, $value) {
         return $acc->update($key, function (ArrayMap $field) use($value) {
             return $field->insert(static::ANNOTATION_CONSTRAINTS, $value);
         }, ArrayMap::zero());
     }, $annotations);
     $annotations = ArrayMap::of($defaults)->foldlWithKeys(function (ArrayMap $acc, $key, $value) {
         return $acc->update($key, function (ArrayMap $field) use($value) {
             return $field->insert(static::ANNOTATION_DEFAULT, $value);
         }, ArrayMap::zero());
     }, $annotations);
     $annotations = ArrayList::of($required)->foldl(function (ArrayMap $acc, $value) {
         return $acc->update($value, function (ArrayMap $field) {
             return $field->insert(static::ANNOTATION_REQUIRED, true);
         }, ArrayMap::zero());
     }, $annotations);
     $this->annotations = $annotations;
 }
Ejemplo n.º 18
0
 /**
  * Construct an instance of a FormSpecPresenter.
  *
  * @param FormSpec $spec
  * @param array $attributes
  *
  * @throws LackOfCoffeeException
  */
 public function __construct(FormSpec $spec, array $attributes = [])
 {
     parent::__construct();
     $this->spec = $spec;
     $this->attributes = $attributes;
 }
Ejemplo n.º 19
0
 /**
  * @inheritDoc
  */
 public function __construct()
 {
     parent::__construct();
     throw new LackOfCoffeeException(vsprintf('The constructor of %s was called, but this is declared as' . ' static.', [static::class]));
 }
Ejemplo n.º 20
0
 /**
  * Instantiate a QueuePusher.
  *
  * @param QueueManager $manager
  */
 public function __construct(QueueManager $manager)
 {
     parent::__construct();
     $this->manager = $manager;
 }
Ejemplo n.º 21
0
 /**
  * Construct a new instance of a SpecGraphFactory.
  */
 public function __construct()
 {
     parent::__construct();
     $this->graph = new SpecGraph();
     $this->nodeFactories = [];
 }
Ejemplo n.º 22
0
 /**
  * Construct an instance of a BaseResponse.
  */
 public function __construct()
 {
     parent::__construct();
     $this->innerResponse = null;
 }
Ejemplo n.º 23
0
 /**
  * Construct an instance of a TypeHound.
  *
  * @param mixed $value
  */
 public function __construct($value)
 {
     parent::__construct();
     $this->value = $value;
 }
Ejemplo n.º 24
0
 /**
  * Construct a new BaseEntity from raw array data
  *
  * @param array $raw
  *
  * @throws LackOfCoffeeException
  */
 public function __construct(array $raw = [])
 {
     parent::__construct();
     $this->raw = $raw;
 }
Ejemplo n.º 25
0
 /**
  * Construct an instance of a HmacSigner.
  *
  * @param KeyPair $keyPair
  * @param HmacHasher $hasher
  *
  * @throws \SellerLabs\Nucleus\Exceptions\LackOfCoffeeException
  */
 public function __construct(KeyPair $keyPair, HmacHasher $hasher = null)
 {
     parent::__construct();
     $this->keyPair = $keyPair;
     $this->hasher = $hasher === null ? new HmacHasher() : $hasher;
 }
Ejemplo n.º 26
0
 /**
  * Construct an instance of a RamlResponseBody.
  */
 public function __construct()
 {
     parent::__construct();
     $this->bodyTypes = [];
 }
Ejemplo n.º 27
0
 /**
  * Construct an instance of a BaseTask.
  *
  * @throws LackOfCoffeeException
  */
 public function __construct()
 {
     parent::__construct();
     $this->spec = $this->getSpec();
 }
Ejemplo n.º 28
0
 /**
  * Construct an instance of a ModelInspector.
  *
  * @param Model $model
  */
 public function __construct(Model $model)
 {
     parent::__construct();
     $this->model = $model;
 }
Ejemplo n.º 29
0
 /**
  * Construct an instance of a SidebarPanelPair.
  *
  * @param mixed $sidebar
  * @param mixed $panel
  */
 public function __construct($sidebar, $panel)
 {
     parent::__construct();
     $this->sidebar = $sidebar;
     $this->panel = $panel;
 }
Ejemplo n.º 30
0
 /**
  * Construct an instance of a HandlerResolver.
  *
  * @param Application $app
  * @param Repository $config
  */
 public function __construct(Application $app, Repository $config)
 {
     parent::__construct();
     $this->app = $app;
     $this->config = $config;
 }