Skip to content

silverreve23/pphp.composer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Package pphp

This package is for those who like beautiful, orderly and easily program code!

API

Class patterns:

  • @php => <?php
  • @class => class
  • @extends => extends
  • @implements => implements
  • @var[+/-/.] => [public/private/protected] variable
  • @vars[+/-/.] => [public/private/protected] static variable
  • @def[+/-/.] => [public/private/protected] function
  • @defs[+/-/.] => [public/private/protected] static function

Construction patterns:

  • @foreach => foreach
  • @if => if
  • @end => close construction

Example:

Source in:

@php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
use App\Classes\Contracts\ReplacerInterface;

@class TestController

  @extends MainController
  @implements ReplacerInterface

  use Request;

  @vars. $staticVar = 'TEST';

  @def+ __construct()

    parent::__construct();

  @end

  @defs+ testFunction($params)

    return true;

  @end

@end

Source out:

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
use App\Classes\Contracts\ReplacerInterface;

class TestController

  extends MainController
  implements ReplacerInterface{

  use Request;

  protected static $staticVar = 'TEST';

  public function __construct(){

    parent::__construct();

  }

  public static function testFunction($params){

    return true;

  }

}

Releases

No releases published

Packages

No packages published