Code Monkey home page Code Monkey logo

laravelgenerators's People

Contributors

nully avatar

Watchers

 avatar  avatar

laravelgenerators's Issues

generate a Service Class skelton

generate a Service Class skelton.

example stub file.

<?php
namespace DummyNamespace;

class DummyClass
{
    // write your code.
}

add a Carbon type ValueObject Class skelton

add a ValueObject class skelton.

Carbon type is, equals DateTime type.

example sutb file.

<?php
namespace DummyNamespace;

use Carbon\Carbon;
use LaravelGenerators\ValueObjects\ValueObjectAbstract as VOAbstract;

class DummyClass extends VOAbstract
{
    /**
     * construct string type ValueObject
     *
     * @param $value    boolean
     */
    public function __construct(Carbon $value)
    {
        $this->value = $value;
        $this->approvedOf();
    }

    /**
      * {@inheritDoc}
      */
    protected function approvedOf()
    {
        assert($this->value type Carbon);
    }

    /**
     * Carbon object cast to formatted string.
     *
     * @param   $format    string    datetime format string
     * @return String
     */
    public function __toString($format)
    {
        return $this->value->format($format);
    }

    public function valueOf($format = 'Y-m-d H:i:s')
    {
        return $this->__toString($format);
    }

    // write your code.
}

add TravisCI setting.

add a .travis-ci.yml.

supports

  • php: >= 5.6.4
  • composer: ^1.4.2

cache dirs

other wise vendor directories.

add Repository Class skelton

generate a Repository class skelton.

example stub file.

<?php
namespace DummyNamespace;

use LaravelGenerators\Repositories\RepositoryAbstract;

class DummyClass extends RepositoryAbstract
{
    // write your code.
}

add a boolean type of ValueObject Class skelton

add a ValueObject class skelton.

example sutb file.

<?php
namespace DummyNamespace;

use LaravelGenerators\ValueObjects\ValueObjectAbstract as VOAbstract;

class DummyClass extends VOAbstract
{
    /**
     * construct string type ValueObject
     *
     * @param $value    boolean
     */
    public function __construct(bool $value)
    {
        $this->value = $value;
        $this->approvedOf();
    }

    /**
      * {@inheritDoc}
      */
    protected function approvedOf()
    {
        assert(is_bool($this->value));
    }

    // write your code.
}

add a Type Class skelton

add a Type class skelton.

Type class It is a pseudo Enum class.

example sutb file.

<?php
namespace DummyNamespace;

use Carbon\Carbon;
use LaravelGenerators\Types\EnumAbstract;

class DummyClass extends EnumAbstract
{
    // write your code.
}

add a ValueObjectGroup Class skelton

add a ValueObjectGroup class skelton.

example sutb file.

<?php
namespace DummyNamespace;

use LaravelGenerators\ValueObjects\ValueObjectGroupAbstract as VOG;

class DummyClass extends VOG
{
    // write your code.
}

add a interger type of ValueObject Class skelton.

add a ValueObject class skelton.

example sutb file.

<?php
namespace DummyNamespace;

use LaravelGenerators\ValueObjects\ValueObjectAbstract as VOAbstract;

class DummyClass extends VOAbstract
{
    /**
     * construct string type ValueObject
     *
     * @param $value    integer
     */
    public function __construct(integer $value)
    {
        $this->value = $value;
        $this->approvedOf();
    }

    /**
      * {@inheritDoc}
      */
    protected function approvedOf()
    {
        assert(is_int($this->value));
    }

    // write your code.
}

add a String type of ValueObject Class skelton.

add a ValueObject class skelton.

example sutb file.

<?php
namespace DummyNamespace;

use LaravelGenerators\ValueObjects\ValueObjectAbstract as VOAbstract;

class DummyClass extends VOAbstract
{
    /**
     * construct string type ValueObject
     *
     * @param $value    string
     */
    public function __construct(string $value)
    {
        $this->value = $value;
        $this->approvedOf();
    }

    /**
      * {@inheritDoc}
      */
    protected function approvedOf()
    {
        assert(!empty($this->value) && is_string($this->value));
    }

    // write your code.
}

add composer.json file for Laravel Generators.

add a composer.json file for Laravel Generators .

What LaravelGenerators ?

LaravelGenerators is It is a command collection to create a class skeleton called "It is nice."

support is

  • Service Class
  • Repository Class
  • ValueObject Class
    • type is string
    • type is integer
    • type is boolean
    • type is Carbon (as DateTime class)
  • ValueObjectGroup Class
  • Type Class

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.