nuxed / framework Goto Github PK
View Code? Open in Web Editor NEW[WIP] High Performance, Async, Hack Framework
License: MIT License
[WIP] High Performance, Async, Hack Framework
License: MIT License
use LOCK_NB
mode.
in case a service provider returns true to a ServiceProviderInterface::provide(string $service)
call, the container assumes that that service provider does provide that specific service, but if it doesn't a fatal error accrues
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}
i was unable to use hsl regex here, help wanted.
framework/src/Nuxed/Http/Message/__Private/CookiesMarshaler.hack
Lines 9 to 14 in 6ec5553
@todo
comment in 6ec5553. It's been assigned to @azjezz because they committed the code.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);
see :
this will also enable using MCRouter as a persistence for the session, so we could have a native async session support ๐
i was unable to use hsl regex here, help wanted.
framework/src/Nuxed/Http/Message/__Private/CookiesMarshaler.hh
Lines 11 to 16 in 6ec5553
@todo
comment in 6ec5553. It's been assigned to @azjezz because they committed the code.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.