Giter Club home page Giter Club logo

framework's People

Contributors

azjezz avatar gitter-badger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

framework's Issues

[Http] use `HH\Lib\Regex` instead of `preg_*`

i was unable to use hsl regex here, help wanted.


* @todo [Http] use `HH\Lib\Regex` instead of `preg_*`
* @body i was unable to use hsl regex here, help wanted.
*/
public function marshal(
Container<string> $headers,
KeyedContainer<string, string> $cookies,


This issue was generated by todo based on a @todo comment in 6ec5553. It's been assigned to @azjezz because they committed the code.

[Container] support attributes

add ability to create service definitions using user attributes.

example :

use namespace Nuxed\Container\Attributes as Container;

<<
  Container\Definition(
    'foo', // id is required 
    Container\arguments( // default no argument 
      Container\argument('service.name.in.container'),
      Container\classnameArgument(AnotherService::class),
      Container\rawArgument(4),
    ),
    Container\methodCalls( // default no method calls
      Container\methodCall(
        'foo',
        new Container\Argument()
      )
    ),
    Container\tags(vec['dummy']), // default empty
    Container\shared(true) // default false
  ),
>>
class Foo {
  public function __construct(SomeService $bar, classname<AnotherService> $baz, int $qux) {
  }
  public function bar(): void {
  }
}

...

$container->register(Foo::class);

Interface nuxed\Contract\Util\Jsonable is not \JsonSerializable

PHP has a default built interface that does this for you, but instead of needing the return a encoded string, it returns the array/object to be encoded.

This allows you to nest JsonSerializable objects.

<?php
class A implements JsonSerializable{
    public $foo;

    public function jsonSerialize(){
        return [
            'afoo' => $this->foo
        ];
    }
}

class B implements JsonSerializable{
    public $arrayOfA;
    public $foo;

    public function jsonSerialize(){
        return [
            'As' => $this->arrayOfA,
            'bfoo' => $this->foo
        ];
    }
}

echo json_encode(
    (new B())->arrayOfA = [new A(), new A()]
);

// {"As":[{"afoo": null},{"afoo": null}],"bfoo":null}

[Http] use `HH\Lib\Regex` instead of `preg_*`

i was unable to use hsl regex here, help wanted.


* @todo [Http] use `HH\Lib\Regex` instead of `preg_*`
* @body i was unable to use hsl regex here, help wanted.
*/
public function marshal(
Container<string> $headers,
KeyedContainer<string, string> $cookies,


This issue was generated by todo based on a @todo comment in 6ec5553. It's been assigned to @azjezz because they committed the code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.