repo stringlengths 7 63 | file_url stringlengths 81 284 | file_path stringlengths 5 200 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:02:33 2026-01-05 05:24:06 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/Tests/Feature/Console/ShowModelTyperMappingsCommandTest.php | test/Tests/Feature/Console/ShowModelTyperMappingsCommandTest.php | <?php
namespace Tests\Feature\Console;
use FumeApp\ModelTyper\Commands\ShowModelTyperMappingsCommand;
use FumeApp\ModelTyper\Constants\TypescriptMappings;
use Tests\TestCase;
class ShowModelTyperMappingsCommandTest extends TestCase
{
public function test_command_can_be_executed_successfully()
{
$this... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/Tests/Feature/Overrides/ModelInspectorTest.php | test/Tests/Feature/Overrides/ModelInspectorTest.php | <?php
namespace Tests\Feature\Overrides;
use FumeApp\ModelTyper\Overrides\ModelInspector;
use Illuminate\Support\Facades\Config;
use ReflectionClass;
use Tests\TestCase;
class ModelInspectorTest extends TestCase
{
public function test_override_can_be_resolved_by_application()
{
$this->assertInstanceO... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/app/Casts/UpperCast.php | test/laravel-skeleton/app/Casts/UpperCast.php | <?php
namespace App\Casts;
use Illuminate\Contracts\Database\Eloquent\CastsInboundAttributes;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
class UpperCast implements CastsInboundAttributes
{
/**
* Prepare the given value for storage.
*
* @param array<string, mixed> $attrib... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/app/Modules/Models/Team.php | test/laravel-skeleton/app/Modules/Models/Team.php | <?php
namespace App\Modules\Models;
use Illuminate\Database\Eloquent\Model;
class Team extends Model
{
//
}
| php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/app/Enums/Roles.php | test/laravel-skeleton/app/Enums/Roles.php | <?php
namespace App\Enums;
use App\Models\User;
/**
* @property ADMIN - Can do anything
* @property USER - Standard read-only
* @property USERCLASS - Value that needs string escaping
*/
enum Roles: string
{
case ADMIN = 'admin';
case USER = 'user';
case USERCLASS = User::class;
public static fun... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/app/Models/User.php | test/laravel-skeleton/app/Models/User.php | <?php
namespace App\Models;
use App\Enums\Roles;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends ... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/app/Models/Complex.php | test/laravel-skeleton/app/Models/Complex.php | <?php
namespace App\Models;
use App\Casts\UpperCast;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
class Complex extends Model
{
protected $table = 'complex_model_table';
protected $casts = [
'json' => 'json',
'jsonb' => 'json',
'year' =>... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/app/Models/ComplexRelationship.php | test/laravel-skeleton/app/Models/ComplexRelationship.php | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ComplexRelationship extends Model
{
protected $table = 'complex_model_table_relationship';
}
| php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/app/Models/Pivot.php | test/laravel-skeleton/app/Models/Pivot.php | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\Pivot as EloquentPivot;
class Pivot extends EloquentPivot {}
| php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/app/Models/AbstractModel.php | test/laravel-skeleton/app/Models/AbstractModel.php | <?php
namespace App\Models;
abstract class AbstractModel {}
| php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/app/Providers/WorkbenchServiceProvider.php | test/laravel-skeleton/app/Providers/WorkbenchServiceProvider.php | <?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class WorkbenchServiceProvider extends ServiceProvider
{
/**
* Register services.
*/
public function register(): void
{
//
}
/**
* Bootstrap services.
*/
public function boot(): void
{
... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/vendor/autoload.php | test/laravel-skeleton/vendor/autoload.php | <?php
// autoload.php @generated by Composer
if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/vendor/composer/autoload_real.php | test/laravel-skeleton/vendor/composer/autoload_real.php | <?php
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit8a7997d3f22b40e226b08f14306cdff6
{
private static $loader;
public static function loadClassLoader($class)
{
if ('Composer\Autoload\ClassLoader' === $class) {
require __DIR__ . '/ClassLoader.php';
}
... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/vendor/composer/autoload_namespaces.php | test/laravel-skeleton/vendor/composer/autoload_namespaces.php | <?php
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
);
| php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/vendor/composer/autoload_psr4.php | test/laravel-skeleton/vendor/composer/autoload_psr4.php | <?php
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'other\\' => array($baseDir . '/other'),
'Database\\Seeders\\' => array($baseDir . '/database/seeders'),
'Database\\Factories\\' => array($baseDir . '/database/factories'),
'... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/vendor/composer/autoload_static.php | test/laravel-skeleton/vendor/composer/autoload_static.php | <?php
// autoload_static.php @generated by Composer
namespace Composer\Autoload;
class ComposerStaticInit8a7997d3f22b40e226b08f14306cdff6
{
public static $prefixLengthsPsr4 = array (
'o' =>
array (
'other\\' => 6,
),
'D' =>
array (
'Database\\Seed... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/vendor/composer/ClassLoader.php | test/laravel-skeleton/vendor/composer/ClassLoader.php | <?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Autoload;
/**
* ClassLoader im... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/vendor/composer/autoload_classmap.php | test/laravel-skeleton/vendor/composer/autoload_classmap.php | <?php
// autoload_classmap.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'App\\Casts\\UpperCast' => $baseDir . '/app/Casts/UpperCast.php',
'App\\Enums\\Roles' => $baseDir . '/app/Enums/Roles.php',
'App\\Models\\AbstractModel' => $baseDir . '/app/M... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/vendor/composer/platform_check.php | test/laravel-skeleton/vendor/composer/platform_check.php | <?php
// platform_check.php @generated by Composer
$issues = array();
if (!(PHP_VERSION_ID >= 80200)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 8.2.0". You are running ' . PHP_VERSION . '.';
}
if ($issues) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error'... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/database/factories/UserFactory.php | test/laravel-skeleton/database/factories/UserFactory.php | <?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class UserFactory extends Factory
{
/**
* The current password being ... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/database/migrations/0001_01_01_000000_create_users_table.php | test/laravel-skeleton/database/migrations/0001_01_01_000000_create_users_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('users', function (Blueprint $table) {
... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/database/migrations/0001_01_01_000003_create_complex_model_table.php | test/laravel-skeleton/database/migrations/0001_01_01_000003_create_complex_model_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('complex_model_table', function (Blueprint $t... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/database/migrations/0001_01_01_000004_create_complex_model_table_relationship.php | test/laravel-skeleton/database/migrations/0001_01_01_000004_create_complex_model_table_relationship.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('complex_model_table_relationship', function ... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/database/migrations/0001_01_01_000002_create_jobs_table.php | test/laravel-skeleton/database/migrations/0001_01_01_000002_create_jobs_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('jobs', function (Blueprint $table) {
... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/database/migrations/0001_01_01_000001_create_cache_table.php | test/laravel-skeleton/database/migrations/0001_01_01_000001_create_cache_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('cache', function (Blueprint $table) {
... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/database/seeders/DatabaseSeeder.php | test/laravel-skeleton/database/seeders/DatabaseSeeder.php | <?php
namespace Database\Seeders;
use Database\Factories\UserFactory;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*/
public function run(): void
{
// UserFactory... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/test/laravel-skeleton/other/VendorComplex.php | test/laravel-skeleton/other/VendorComplex.php | <?php
namespace other;
use App\Casts\UpperCast;
use App\Models\ComplexRelationship;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
class VendorComplex extends Model
{
protected $table = 'complex_model_table';
protected $casts = [
'json' => 'json',
... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
fumeapp/modeltyper | https://github.com/fumeapp/modeltyper/blob/c503ca0b2010d74fc14418234f9661632c56d028/config/modeltyper.php | config/modeltyper.php | <?php
return [
/*
|--------------------------------------------------------------------------
| Run After Migrate
|--------------------------------------------------------------------------
|
| Specifies whether to execute modeltyper after running database migrations.
| This can be useful f... | php | MIT | c503ca0b2010d74fc14418234f9661632c56d028 | 2026-01-05T02:41:24.985654Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/index.php | index.php | <?php
/**
* Created by PhpStorm.
* User: Jimersy Lee
* Date: 2017/5/27
* Time: 14:24
*/
use Andromeda\App;
use Andromeda\Di\FactoryDefault\FactoryDefault;
use Whoops\Handler\PrettyPageHandler;
use Whoops\Run;
include "./vendor/autoload.php";
$whoops = new Run();
$whoops->pushHandler(new PrettyPageHandler());
$w... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/test/namespace/NameSpaceClass.php | test/namespace/NameSpaceClass.php | <?php
/**
* Created by PhpStorm.
* User: Jimersy Lee
* Date: 2017/5/31
* Time: 13:00
*/
namespace Util;
class NameSpaceClass{
public static function outPut(){
return "This is a Utils namespace \n";
}
} | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/test/namespace/test.php | test/namespace/test.php | <?php
/**
* Created by PhpStorm.
* User: Jimersy Lee
* Date: 2017/5/31
* Time: 11:08
*/
/*
* 关于namespace的使用
* */
include "./NameSpaceClass.php";
include "./UseNameSpace.php";
UseNameSpace::useOutPut(); | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/test/namespace/UseNameSpace.php | test/namespace/UseNameSpace.php | <?php
/**
* Created by PhpStorm.
* User: Jimersy Lee
* Date: 2017/5/31
* Time: 13:01
*/
use Util\NameSpaceClass;
UseNameSpace::useOutPut();
class UseNameSpace{
public static function useOutPut(){
echo NameSpaceClass::outPut();
}
} | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/test/di/Di.php | test/di/Di.php | <?php
/**
* Created by IntelliJ IDEA.
* User: Jimersy Lee
* Date: 2017/6/17
* Time: 10:39
*/
class Di implements ArrayAccess
{
private $_bindings = array();//服务列表
private $_instances = array();//已经实例化的服务
// //获取服务
public function get($name, $params = array())
{
//先从已经实例化的列表中查找
... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/test/di/test.php | test/di/test.php | <?php
/**
* Created by IntelliJ IDEA.
* User: Jimersy Lee
* Date: 2017/6/17
* Time: 10:47
*/
/*
*
* 简单的Di容器实现
*
*
* */
header("Content-Type:text/html;charset=utf8");
class A{
public $name;
public $age;
public function __construct($name=""){
$this->name = $name;
}
}
include "Di.php... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/Di.php | Andromeda/Di.php | <?php
/**
* Created by PhpStorm.
* User: Jimersy Lee
* Date: 2017/5/27
* Time: 15:49
*/
namespace Andromeda;
/**
* 依赖注入实现核心类
* Class Di
* @package Andromeda
*/
class Di implements DiInterface
{
/**
* List of registered services
*/
protected $_services;
/**
* List of shared instanc... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/Request.php | Andromeda/Request.php | <?php
namespace Andromeda;
use Andromeda\Exception;
class Request
{
/**
* @var object 对象实例
*/
protected static $instance;
protected $method;
/**
* @var string 域名(含协议和端口)
*/
protected $domain;
/**
* @var string URL地址
*/
protected $url;
/**
* @var st... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | true |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/Response.php | Andromeda/Response.php | <?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2017 http://thinkphp.cn All rights reserved.
// +-------------------------------------------------... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/App.php | Andromeda/App.php | <?php
/**
* Created by PhpStorm.
* User: Jimersy Lee
* Date: 2017/5/27
* Time: 14:45
*/
namespace Andromeda;
use Andromeda\Di\Injectable;
class App extends Injectable {
/**
* 依赖注入管理器
* @var
*/
protected $_dependencyInjector;
/**
* 事件管理器
* @var
*/
protected $_event... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/Exception.php | Andromeda/Exception.php | <?php
/**
* Created by PhpStorm.
* User: jimersylee
* Date: 17-10-16
* Time: 下午2:44
*/
namespace Andromeda;
class Exception extends \Exception
{
/**
* 保存异常页面显示的额外Debug数据
* @var array
*/
protected $data = [];
/**
* 设置异常额外的Debug数据
* 数据将会显示为下面的格式
*
* Exception Data
... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/DiInterface.php | Andromeda/DiInterface.php | <?php
/**
* Created by PhpStorm.
* User: Jimersy Lee
* Date: 2017/5/27
* Time: 15:13
*/
namespace Andromeda;
interface DiInterface extends \ArrayAccess
{
} | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/Andromeda.php | Andromeda/Andromeda.php | <?php
/**
* Created by PhpStorm.
* User: Jimersy Lee
* Date: 2017/6/16
* Time: 12:42
*/
use Andromeda\Request;
class Andromeda extends \Andromeda\Di\Injectable
{
public static $s_arr_query;
public static function run($di = null)
{
//self::error();
self::init();
self::autoload... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/Di/InjectionAwareInterface.php | Andromeda/Di/InjectionAwareInterface.php | <?php
/**
* Created by PhpStorm.
* User: Jimersy Lee
* Date: 2017/6/16
* Time: 14:07
*/
namespace Andromeda\Di;
interface InjectionAwareInterface
{
public function setDI($di);
public function getDI();
} | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/Di/Injectable.php | Andromeda/Di/Injectable.php | <?php
/**
* Created by PhpStorm.
* User: Jimersy Lee
* Date: 2017/5/27
* Time: 15:11
*/
namespace Andromeda\Di;
abstract class Injectable implements InjectionAwareInterface
{
protected $_dependencyInjector;
protected $_eventsManager;
public function setDI( $dependenceInjector)
{
... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/Di/FactoryDefault.php | Andromeda/Di/FactoryDefault.php | <?php
/**
* Created by PhpStorm.
* User: Jimersy Lee
* Date: 2017/5/27
* Time: 14:37
*/
namespace Andromeda\Di\FactoryDefault;
use Andromeda\Di;
/**
* 相当于服务容器
* Class Factory
* @package Andromeda\Di
*/
class FactoryDefault extends Di
{
/*
* 设置共享服务
* @param $name
* @param $definition
... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/core/Util.class.php | Andromeda/core/Util.class.php | <?php
class Util{
/**
* 解析用户的url的中的query参数
* @param $query
* @return array
*/
public static function convertUrlQuery($query){
$queryParts = explode('&', $query);
$params = array();
foreach ($queryParts as $param)
{
$item = explode('=', $param);
... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/core/View.class.php | Andromeda/core/View.class.php | <?php
/**
* mvc的v类
* Class View
*/
class View
{
private $data = array();
private $render = false;
public function __construct()
{
}
public function __destruct()
{
}
/**
* 直接设置view页面
* set view page directly
* @param $template
*/
public function setV... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/core/Mysql.class.php | Andromeda/core/Mysql.class.php | <?php
/**
* DAOPDO
* @authors by houzhyan <houzhyan@126.com>
* @blog http://www.descartes.top/
* @version >5.1 utf8
*/
class Mysql
{
protected static $_instance = null;
protected $dbName = '';
protected $dsn;
protected $dbClient;
/**
* 构造
*
* @param array $config
* @throws... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/core/Log.class.php | Andromeda/core/Log.class.php | <?php
/**
* Created by PhpStorm.
* User: Jimersy Lee
* Date: 2017/6/15
* Time: 13:59
*/
use Psr\Log\LoggerInterface;
class Log implements LoggerInterface
{
const LOG = 'log';
const ERROR = 'error';
const INFO = 'info';
const SQL = 'sql';
const NOTICE = 'notice';
const ALERT = 'a... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/core/Controller.class.php | Andromeda/core/Controller.class.php | <?php
// base Controller
class Controller{
//base Controller has a property called $loader, it is an instance of Loader class
protected $loader;
protected $view;
protected $di;
public function __construct($di){
$this->loader=new Loader();
$this->view=new View();
$this->di=$di;
}
public function redi... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/core/Loader.class.php | Andromeda/core/Loader.class.php | <?php
class Loader{
//load library classes
public function library($lib){
include LIB_PATH."$lib.class.php";
}
//loader helper functions.Naming conversion is xxx_helper.php;
public function helper($helper){
include HELPER_PATH."{$helper}_helper.php";
}
public function registerDir($DirArray){
}
... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/core/Model.class.php | Andromeda/core/Model.class.php | <?php
// Andromeda/core/Model.class.php
//Base Model Class;
class Model
{
/**
* @var Mysql
*/
protected $db;
protected $table;
protected $fields = array();//
public function __construct($table)
{
$dbConfig['host'] = $GLOBALS['config']['DB_HOST'];
$dbConfig['user'] = $G... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/core/TemplateEngine/Compile.class.php | Andromeda/core/TemplateEngine/Compile.class.php | <?php
/**
* 模板编译工具类
*/
class Compile
{
private $template; //带编译文件
private $content; //需要替换的文本
private $comfile; //编译后的文件
private $left = '{'; //左界定符
private $right = '}'; //右界定符
private $value = array(); //值栈
private $php_turn;
private $T_P = array();
private $T_R = array();
public function... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/core/TemplateEngine/test.php | Andromeda/core/TemplateEngine/test.php | <?php
include 'Template.class.php';
$tpl = new Template(['debug'=>true]);
$tpl->assign('data', 'hello world');
$tpl->assign('person', 'htGod');
$tpl->assign('data1', 3);
$arr = array(1,2,3,4,'5',6);
$tpl->assign('b', $arr);
$tpl->display('member');
| php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/core/TemplateEngine/Template.class.php | Andromeda/core/TemplateEngine/Template.class.php | <?php
/**
* Template
*/
class Template
{
private $arrayConfig = array(
'suffix' => '.tpl', //模板的后缀
'templateDir' => "template/", //模板所在的文件夹
'compileDir' => "cache/", //编译后存放的目录
'cache_html' => false, //是否需要编译成静态的html文件
'suffix_cache' => '.html', //设置编译... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/core/TemplateEngine/cache/aa08769cdcb26674c6706093503ff0a3.php | Andromeda/core/TemplateEngine/cache/aa08769cdcb26674c6706093503ff0a3.php | <script src=bootstrap.js?t=1536591797></script>
<?php echo $this->value['data']; ?>,<?php echo $this->value['person']; ?>
<ul>
<?php foreach ((array)$this->value['b'] as $K => $V) { ?>
<li><?php echo $V; ?></li><?php } ?>
</ul>
<?php
echo '这里是php原生代码',$data1*2,"<br/>";
?>
<?php if ($data === 'a') { ?>
成... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/core/log/driver/File.php | Andromeda/core/log/driver/File.php | <?php
/**
* Created by PhpStorm.
* User: jimersylee
* Date: 17-10-11
* Time: 上午9:21
*/
/**
* 文件方式的日志记录
* Class File
*/
class File
{
} | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/Mvc/Writer.php | Andromeda/Mvc/Writer.php | <?php
/**
* Created by PhpStorm.
* User: Jimersy Lee
* Date: 2017/5/27
* Time: 15:03
*/
namespace Andromeda\Mvc;
use Andromeda\App;
class Writer extends App
{
public function __construct($di)
{
parent::__construct($di);
echo "new Writer<br>";
}
/**
* 在浏览器输出一些内容
* @p... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/Mvc/Controller.php | Andromeda/Mvc/Controller.php | <?php
/**
* Created by PhpStorm.
* User: Jimersy Lee
* Date: 2017/5/27
* Time: 15:24
*/
namespace Andromeda\Mvc;
use Andromeda\Di\Injectable;
abstract class Controller extends Injectable
{
protected $loader;
protected $view;
protected $di;
public function __get($name)
{
$instance=... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/Andromeda/Mvc/SingletonWriter.php | Andromeda/Mvc/SingletonWriter.php | <?php
/**
* Created by PhpStorm.
* User: Jimersy Lee
* Date: 2017/5/27
* Time: 15:03
*/
namespace Andromeda\Mvc;
use Andromeda\App;
/**
* 单例模式使用的类实例类
* Class SingletonWriter
* @package Andromeda\Mvc
*/
class SingletonWriter extends App
{
private static $singletonWriter;
public function __construct... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/App/Controllers/Home/BaseController.class.php | App/Controllers/Home/BaseController.class.php | <?php
/**
* Created by PhpStorm.
* User: Jimersy Lee
* Date: 2017/5/27
* Time: 15:30
*/
use Andromeda\Mvc\Controller;
/**
* Class Injectable
* @property \Andromeda\Mvc\Writer $writer
* @property \Andromeda\Mvc\SingletonWriter $singletonWriter
*/
class BaseController extends Controller
{
} | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/App/Controllers/Home/IndexController.class.php | App/Controllers/Home/IndexController.class.php | <?php
/**
* Created by PhpStorm.
* User: Jimersy Lee
* Date: 2017/5/27
* Time: 15:30
*/
/**
* Class IndexController
*
*/
class IndexController extends BaseController
{
public function index()
{
$this->writer->hello();
$this->writer->hello();
$this->writer->hello();
Log... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/App/Config/loader.php | App/Config/loader.php | <?php
/**
* Created by PhpStorm.
* User: Jimersy Lee
* Date: 2017/6/16
* Time: 9:27
*/
//自动载入php文件
include ROOT . "/Andromeda/Mvc/Writer.php";
include ROOT."Andromeda/Mvc/SingletonWriter.php";
/*
$loader=new Loader();
$loader->registerDirs(
[
//目录
$config->application->controllersDir,
... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/App/Config/config.php | App/Config/config.php | <?php
/**
* Created by PhpStorm.
* User: Jimersy Lee
* Date: 2017/6/16
* Time: 9:26
*/
return array(
'DB_TYPE' => 'mysql',
'DB_HOST' => 'mysql',
'DB_NAME' => 'andromeda',
'DB_USER' => 'root',
'DB_PASSWORD'=> '123456',
'DB_PORT' => '3306',
'DB_CHARSET' => 'utf-8',
'D... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/App/Config/service.php | App/Config/service.php | <?php
/**
* Created by PhpStorm.
* User: Jimersy Lee
* Date: 2017/5/27
* Time: 14:52
*/
//服务配置
use Andromeda\Mvc\Writer;
use Andromeda\Mvc\SingletonWriter;
$config = [];
//闭包 use支持多多个参数,可以利用此特性传递多个参数
$di->setShared("singletonWriter", function () use ($di, $config) {
$singletonWriter = SingletonWriter::getIn... | php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/App/Config/router.php | App/Config/router.php | <?php
/**
* Created by PhpStorm.
* User: Jimersy Lee
* Date: 2017/6/16
* Time: 9:26
*/
| php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
jimersylee/Andromeda | https://github.com/jimersylee/Andromeda/blob/1eb4314f9481acb42bdb1d6b676971294a04d674/App/Models/UserModel.class.php | App/Models/UserModel.class.php | <?php
//application/models/UserModel.class.php
class UserModel extends Model{
/**
* @return array
*/
public function getUsers(){
$sql="select * from {$this->table}";
$user=$this->db->query($sql);
return $user;
}
}
| php | MIT | 1eb4314f9481acb42bdb1d6b676971294a04d674 | 2026-01-05T02:41:35.053468Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/requirements.php | requirements.php | <?php
/**
* Application requirement checker script.
*
* In order to run this script use the following console command:
* php requirements.php
*
* In order to run this script from the web, you should copy it to the web root.
* If you are using Linux you can create a hard link instead, using the following command:... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/console/controllers/AppController.php | console/controllers/AppController.php | <?php
/**
* User: TheCodeholic
* Date: 12/29/2020
* Time: 3:08 PM
*/
namespace console\controllers;
use common\models\User;
use yii\console\Controller;
use yii\helpers\Console;
/**
* Class AppController
*
* @author Zura Sekhniashvili <zurasekhniashvili@gmail.com>
* @package console\controllers
*/
class Ap... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/console/migrations/m130524_201442_init.php | console/migrations/m130524_201442_init.php | <?php
use yii\db\Migration;
class m130524_201442_init extends Migration
{
public function up()
{
$tableOptions = null;
if ($this->db->driverName === 'mysql') {
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/console/migrations/m201212_081304_add_firstname_lastname_columns_to_user_table.php | console/migrations/m201212_081304_add_firstname_lastname_columns_to_user_table.php | <?php
use yii\db\Migration;
/**
* Handles adding columns to table `{{%user}}`.
*/
class m201212_081304_add_firstname_lastname_columns_to_user_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->addColumn('{{%user}}', 'firstname', $this->string(255)->notNu... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/console/migrations/m201124_065518_create_order_addresses_table.php | console/migrations/m201124_065518_create_order_addresses_table.php | <?php
use yii\db\Migration;
/**
* Handles the creation of table `{{%order_addresses}}`.
* Has foreign keys to the tables:
*
* - `{{%order}}`
*/
class m201124_065518_create_order_addresses_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable(... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/console/migrations/m201124_064518_create_user_addresses_table.php | console/migrations/m201124_064518_create_user_addresses_table.php | <?php
use yii\db\Migration;
/**
* Handles the creation of table `{{%user_addresses}}`.
* Has foreign keys to the tables:
*
* - `{{%user}}`
*/
class m201124_064518_create_user_addresses_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('{{... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/console/migrations/m190124_110200_add_verification_token_column_to_user_table.php | console/migrations/m190124_110200_add_verification_token_column_to_user_table.php | <?php
use \yii\db\Migration;
class m190124_110200_add_verification_token_column_to_user_table extends Migration
{
public function up()
{
$this->addColumn('{{%user}}', 'verification_token', $this->string()->defaultValue(null));
}
public function down()
{
$this->dropColumn('{{%user}... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/console/migrations/m201124_064907_create_orders_table.php | console/migrations/m201124_064907_create_orders_table.php | <?php
use yii\db\Migration;
/**
* Handles the creation of table `{{%orders}}`.
* Has foreign keys to the tables:
*
* - `{{%user}}`
*/
class m201124_064907_create_orders_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('{{%orders}}', [
... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/console/migrations/m201124_065209_create_order_items_table.php | console/migrations/m201124_065209_create_order_items_table.php | <?php
use yii\db\Migration;
/**
* Handles the creation of table `{{%order_items}}`.
* Has foreign keys to the tables:
*
* - `{{%products}}`
* - `{{%orders}}`
*/
class m201124_065209_create_order_items_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/console/migrations/m201124_066009_create_cart_items_table.php | console/migrations/m201124_066009_create_cart_items_table.php | <?php
use yii\db\Migration;
/**
* Handles the creation of table `{{%cart_items}}`.
* Has foreign keys to the tables:
*
* - `{{%products}}`
* - `{{%orders}}`
*/
class m201124_066009_create_cart_items_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/console/migrations/m201217_061032_add_paypal_order_id_column_to_orders_table.php | console/migrations/m201217_061032_add_paypal_order_id_column_to_orders_table.php | <?php
use yii\db\Migration;
/**
* Handles adding columns to table `{{%orders}}`.
*/
class m201217_061032_add_paypal_order_id_column_to_orders_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->addColumn('{{%orders}}', 'paypal_order_id', $this->string(255... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/console/migrations/m201226_071858_change_product_id_foreign_key_on_order_item_table.php | console/migrations/m201226_071858_change_product_id_foreign_key_on_order_item_table.php | <?php
use yii\db\Migration;
/**
* Class m201226_071858_change_product_id_foreign_key_on_order_item_table
*/
class m201226_071858_change_product_id_foreign_key_on_order_item_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
// drops foreign key for table `{{%pr... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/console/migrations/m201226_063616_add_admin_column_to_user_table.php | console/migrations/m201226_063616_add_admin_column_to_user_table.php | <?php
use yii\db\Migration;
/**
* Handles adding columns to table `{{%user}}`.
*/
class m201226_063616_add_admin_column_to_user_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->addColumn('{{%user}}', 'admin', $this->boolean()->after('status'));
}
... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/console/migrations/m201124_064118_create_products_table.php | console/migrations/m201124_064118_create_products_table.php | <?php
use yii\db\Migration;
/**
* Handles the creation of table `{{%products}}`.
* Has foreign keys to the tables:
*
* - `{{%user}}`
* - `{{%user}}`
*/
class m201124_064118_create_products_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTabl... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/console/config/main.php | console/config/main.php | <?php
$params = array_merge(
require __DIR__ . '/../../common/config/params.php',
require __DIR__ . '/../../common/config/params-local.php',
require __DIR__ . '/params.php',
require __DIR__ . '/params-local.php'
);
return [
'id' => 'app-console',
'basePath' => dirname(__DIR__),
'bootstrap' ... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/console/config/params.php | console/config/params.php | <?php
return [
'adminEmail' => 'admin@example.com',
];
| php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/console/config/test.php | console/config/test.php | <?php
return [
]; | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/console/config/bootstrap.php | console/config/bootstrap.php | <?php
| php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/backend/tests/_bootstrap.php | backend/tests/_bootstrap.php | <?php
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
defined('YII_APP_BASE_PATH') or define('YII_APP_BASE_PATH', __DIR__.'/../../');
require_once YII_APP_BASE_PATH . '/vendor/autoload.php';
require_once YII_APP_BASE_PATH . '/vendor/yiisoft/yii2/Yii.php';
require_onc... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/backend/tests/_data/login_data.php | backend/tests/_data/login_data.php | <?php
return [
[
'username' => 'erau',
'auth_key' => 'tUu1qHcde0diwUol3xeI-18MuHkkprQI',
// password_0
'password_hash' => '$2y$13$nJ1WDlBaGcbCdbNC5.5l4.sgy.OMEKCqtDQOdQ2OWpgiKRWYyzzne',
'password_reset_token' => 'RkD_Jw0_8HEedzLk7MM-ZKEFfYR7VbMr_1392559490',
'created_... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/backend/tests/unit/_bootstrap.php | backend/tests/unit/_bootstrap.php | <?php
/**
* Here you can initialize variables via \Codeception\Util\Fixtures class
* to store data in global array and use it in Tests.
*
* ```php
* // Here _bootstrap.php
* \Codeception\Util\Fixtures::add('user1', ['name' => 'davert']);
* ```
*
* In Tests
*
* ```php
* \Codeception\Util\Fixtures::get('user1... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/backend/tests/_support/UnitTester.php | backend/tests/_support/UnitTester.php | <?php
namespace backend\tests;
/**
* Inherited Methods
* @method void wantToTest($text)
* @method void wantTo($text)
* @method void execute($callable)
* @method void expectTo($prediction)
* @method void expect($prediction)
* @method void amGoingTo($argumentation)
* @method void am($role)
* @method void lookFo... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/backend/tests/_support/FunctionalTester.php | backend/tests/_support/FunctionalTester.php | <?php
namespace backend\tests;
/**
* Inherited Methods
* @method void wantToTest($text)
* @method void wantTo($text)
* @method void execute($callable)
* @method void expectTo($prediction)
* @method void expect($prediction)
* @method void amGoingTo($argumentation)
* @method void am($role)
* @method void lookFo... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/backend/tests/functional/LoginCest.php | backend/tests/functional/LoginCest.php | <?php
namespace backend\tests\functional;
use backend\tests\FunctionalTester;
use common\fixtures\UserFixture;
/**
* Class LoginCest
*/
class LoginCest
{
/**
* Load fixtures before db transaction begin
* Called in _before()
* @see \Codeception\Module\Yii2::_before()
* @see \Codeception\Modu... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/backend/tests/functional/_bootstrap.php | backend/tests/functional/_bootstrap.php | <?php
/**
* Here you can initialize variables via \Codeception\Util\Fixtures class
* to store data in global array and use it in Cests.
*
* ```php
* // Here _bootstrap.php
* \Codeception\Util\Fixtures::add('user1', ['name' => 'davert']);
* ```
*
* In Cests
*
* ```php
* \Codeception\Util\Fixtures::get('user1... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/backend/controllers/ProductController.php | backend/controllers/ProductController.php | <?php
namespace backend\controllers;
use Yii;
use common\models\Product;
use backend\models\search\ProductSearch;
use yii\filters\AccessControl;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use yii\web\UploadedFile;
/**
* ProductController implements the CRUD actions for Pr... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/backend/controllers/OrderController.php | backend/controllers/OrderController.php | <?php
namespace backend\controllers;
use Yii;
use common\models\Order;
use backend\models\search\OrderSearch;
use yii\filters\AccessControl;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
/**
* OrderController implements the CRUD actions for Order model.
*/
class OrderContro... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/backend/controllers/SiteController.php | backend/controllers/SiteController.php | <?php
namespace backend\controllers;
use backend\models\PasswordResetRequestForm;
use backend\models\ResetPasswordForm;
use common\models\Order;
use common\models\OrderItem;
use common\models\User;
use Yii;
use yii\base\InvalidArgumentException;
use yii\helpers\ArrayHelper;
use yii\web\BadRequestHttpException;
use yi... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/backend/models/ResetPasswordForm.php | backend/models/ResetPasswordForm.php | <?php
namespace backend\models;
use common\models\User;
use yii\base\InvalidArgumentException;
/**
* Password reset form
*/
class ResetPasswordForm extends \common\models\ResetPasswordForm
{
public function findUser($token)
{
if (!User::isPasswordResetTokenValid($token)) {
return null;... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/backend/models/PasswordResetRequestForm.php | backend/models/PasswordResetRequestForm.php | <?php
namespace backend\models;
use common\models\User;
/**
* Password reset request form
*/
class PasswordResetRequestForm extends \common\models\PasswordResetRequestForm
{
/**
* {@inheritdoc}
*/
public function rules()
{
return [
['email', 'trim'],
['email', '... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/backend/models/LoginForm.php | backend/models/LoginForm.php | <?php
namespace backend\models;
use common\models\User;
use Yii;
use yii\base\Model;
/**
* Login form
*/
class LoginForm extends \common\models\LoginForm
{
/**
* Finds user by [[username]]
*
* @return User|null
*/
protected function getUser()
{
if ($this->_user === null) {
... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/backend/models/search/ProductSearch.php | backend/models/search/ProductSearch.php | <?php
namespace backend\models\search;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use common\models\Product;
/**
* ProductSearch represents the model behind the search form of `common\models\Product`.
*/
class ProductSearch extends Product
{
/**
* {@inheritdoc}
*/
public function rules(... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/backend/models/search/OrderSearch.php | backend/models/search/OrderSearch.php | <?php
namespace backend\models\search;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use common\models\Order;
/**
* OrderSearch represents the model behind the search form of `common\models\Order`.
*/
class OrderSearch extends Order
{
public $fullname;
/**
* {@inheritdoc}
*/
public fun... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
thecodeholic/yii2-ecommerce-website | https://github.com/thecodeholic/yii2-ecommerce-website/blob/11e6f2c1b010a67c28f9c46e5df951d9c5aea07d/backend/views/site/reset_password.php | backend/views/site/reset_password.php | <?php
/* @var $this yii\web\View */
/* @var $form yii\bootstrap4\ActiveForm */
/* @var $model \backend\models\PasswordResetRequestForm */
use yii\helpers\Html;
use yii\bootstrap4\ActiveForm;
$this->title = 'Login';
?>
<div class="row">
<div class="col-lg-6 d-none d-lg-block bg-login-image"
style="backg... | php | BSD-3-Clause | 11e6f2c1b010a67c28f9c46e5df951d9c5aea07d | 2026-01-05T02:41:44.027017Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.