Beispiel #1
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;
 }
Beispiel #2
0
 /**
  * Construct an instance of a DropdownFactory.
  */
 public function __construct()
 {
     parent::__construct();
     $this->hash = Str::random();
     $this->options = [];
     $this->right = false;
 }
 /**
  * Construct an instance of a SpecRequest.
  *
  * @param Request $request
  * @param Route $route
  * @param Container $container
  *
  * @throws LackOfCoffeeException
  */
 public function __construct(Request $request, Route $route, Container $container)
 {
     parent::__construct();
     $this->request = $request;
     $this->route = $route;
     $this->container = $container;
 }
 /**
  * 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;
 }
Beispiel #5
0
 /**
  * Construct an instance of a SpecFactory.
  */
 public function __construct()
 {
     parent::__construct();
     $this->constraints = new ArrayMap();
     $this->defaults = new ArrayMap();
     $this->required = new ArrayList();
 }
Beispiel #6
0
 /**
  * Construct an instance of a Flick.
  *
  * @param array|ArrayAccess|Traversable $functions
  * @param string $default
  *
  * @throws InvalidArgumentException
  * @throws \Chromabits\Nucleus\Exceptions\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;
 }
Beispiel #7
0
 /**
  * Construct an instance of a Dashboard.
  *
  * @param Application $application
  */
 public function __construct(Application $application)
 {
     parent::__construct();
     $this->application = $application;
     $this->modules = [];
     $this->failedModules = [];
 }
 /**
  * Construct an instance of a ResourceMethod.
  *
  * @param string $method
  * @param string $verb
  * @param string $path
  */
 public function __construct($method, $verb, $path)
 {
     parent::__construct();
     Arguments::contain(Boa::string(), Boa::string(), Boa::string())->check($method, $verb, $path);
     $this->method = $method;
     $this->verb = $verb;
     $this->path = $path;
 }
Beispiel #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;
 }
Beispiel #10
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::contain(Boa::arr(), Boa::in($this->getValidStatuses()), Boa::arr())->check($content, $status, $messages);
     $this->content = $content;
     $this->status = $status;
     $this->messages = $messages;
 }
Beispiel #11
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();
 }
Beispiel #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;
 }
Beispiel #13
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;
 }
 /**
  * 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.';
 }
Beispiel #15
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();
 }
Beispiel #16
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;
 }
 /**
  * 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 = '';
 }
Beispiel #18
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;
 }
Beispiel #19
0
 /**
  * Construct an instance of a TypeHound.
  *
  * @param mixed $value
  */
 public function __construct($value)
 {
     parent::__construct();
     $this->value = $value;
 }
Beispiel #20
0
 /**
  * Construct an instance of a JobScheduler.
  *
  * @param JobRepositoryInterface $jobs
  * @param JobFactoryInterface $factory
  */
 public function __construct(JobRepositoryInterface $jobs, JobFactoryInterface $factory)
 {
     parent::__construct();
     $this->jobs = $jobs;
     $this->factory = $factory;
 }
Beispiel #21
0
 /**
  * Construct an instance of a BaseResponse.
  */
 public function __construct()
 {
     parent::__construct();
     $this->innerResponse = null;
 }
Beispiel #22
0
 /**
  * Construct an instance of an Arguments.
  *
  * @param AbstractConstraint[] ...$constraints
  */
 public function __construct(...$constraints)
 {
     parent::__construct();
     $this->constraints = $constraints;
 }
Beispiel #23
0
 /**
  * Instantiate a QueuePusher.
  *
  * @param QueueManager $manager
  */
 public function __construct(QueueManager $manager)
 {
     parent::__construct();
     $this->manager = $manager;
 }
 /**
  * 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;
 }
 /**
  * Construct an instance of a AlertPresenter.
  *
  * @param AlertManager $manager
  */
 public function __construct(AlertManager $manager)
 {
     parent::__construct();
     $this->alerts = $manager->all();
 }
 /**
  * Construct an instance of a ConferencePaginator.
  *
  * @param Paginator $paginator
  */
 public function __construct(Paginator $paginator)
 {
     parent::__construct();
     $this->paginator = $paginator;
 }
 /**
  * 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;
 }
 /**
  * Construct an instance of an AggregatedHasher.
  */
 public function __construct()
 {
     parent::__construct();
     $this->targetHasher = new BcryptHasher();
     $this->supportedHashers = [new Md5Hasher()];
 }
Beispiel #29
0
 /**
  * Construct a new instance of a SpecGraphFactory.
  */
 public function __construct()
 {
     parent::__construct();
     $this->graph = new SpecGraph();
     $this->nodeFactories = [];
 }
Beispiel #30
0
 /**
  * Construct an instance of a SafeHtmlWrapper.
  *
  * @param string $safeHtml
  */
 public function __construct($safeHtml)
 {
     parent::__construct();
     $this->content = (string) $safeHtml;
 }