Skip to content

Commit

Permalink
feat: add file reader blueprint
Browse files Browse the repository at this point in the history
  • Loading branch information
yusuftaufiq committed Apr 5, 2022
1 parent 7b79d70 commit 5e9a4b8
Show file tree
Hide file tree
Showing 6 changed files with 196 additions and 0 deletions.
48 changes: 48 additions & 0 deletions src/Readers/AbstractReader.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php

namespace Haemanthus\CodeIgniter3IdeHelper\Readers;

abstract class AbstractReader
{
/**
* Undocumented variable
*
* @var array<string, array<string, string>>
*/
protected $map = [
'cores' => [
'benchmark' => '\CI_Benchmark',
'config' => '\CI_Config',
'input' => '\CI_Input',
'lang' => '\CI_Lang',
'loader' => '\CI_Loader',
'output' => '\CI_Output',
'security' => '\CI_Security',
'uri' => '\CI_URI',
],
'libraries' => [
'cache' => '\CI_Cache',
'calendar' => '\CI_Calendar',
'driver' => '\CI_Driver',
'email' => '\CI_Email',
'encryption' => '\CI_Encryption',
'form_validation' => '\CI_Form_validation',
'ftp' => '\CI_Ftp',
'image_lib' => '\CI_Image_lib',
'migration' => '\CI_Migration',
'pagination' => '\CI_Pagination',
'parser' => '\CI_Parser',
'profiler' => '\CI_Profiler',
'session' => '\CI_Session',
'table' => '\CI_Table',
'trackback' => '\CI_Trackback',
'typography' => '\CI_Typography',
'unit_test' => '\CI_Unit_test',
'upload' => '\CI_Upload',
'user_agent' => '\CI_User_agent',
'xmlrpc' => '\CI_Xmlrpc',
'xmlrpcs' => '\CI_Xmlrpcs',
'zip' => '\CI_Zip',
],
];
}
48 changes: 48 additions & 0 deletions src/Readers/AutoloadReader.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php

namespace Haemanthus\CodeIgniter3IdeHelper\Readers;

class AutoloadReader extends AbstractReader
{
/**
* Undocumented variable
*
* @var string
*/
protected $dir = './';

/**
* Undocumented variable
*
* @var string $path
*/
protected $path = './application/config/autoload.php';

/**
* Undocumented variable
*
* @var array<string, array<int, string>>
*/
protected $autoload = [
'cores' => [
'benchmark',
'config',
'input',
'lang',
'loader',
'output',
'security',
'uri',
],
];

/**
* Undocumented function
*
* @param string $dir
*/
public function __construct($dir)
{
$this->dir = $dir;
}
}
30 changes: 30 additions & 0 deletions src/Readers/ControllerReader.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

namespace Haemanthus\CodeIgniter3IdeHelper\Readers;

class ControllerReader extends AbstractReader
{
/**
* Undocumented variable
*
* @var string
*/
protected $dir = './';

/**
* Undocumented variable
*
* @var string $path
*/
protected $path = './application/controllers/';

/**
* Undocumented function
*
* @param string $dir
*/
public function __construct($dir)
{
$this->dir = $dir;
}
}
20 changes: 20 additions & 0 deletions src/Readers/DataClass.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Haemanthus\CodeIgniter3IdeHelper\Readers;

class DataClass
{
/**
* Undocumented variable
*
* @var string
*/
public $className;

/**
* Undocumented variable
*
* @var array<DataProperty>
*/
public $properties;
}
20 changes: 20 additions & 0 deletions src/Readers/DataProperty.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Haemanthus\CodeIgniter3IdeHelper\Readers;

class DataProperty
{
/**
* Undocumented variable
*
* @var string
*/
public $key;

/**
* Undocumented variable
*
* @var string
*/
public $object;
}
30 changes: 30 additions & 0 deletions src/Readers/ModelReader.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

namespace Haemanthus\CodeIgniter3IdeHelper\Readers;

class ModelReader extends AbstractReader
{
/**
* Undocumented variable
*
* @var string
*/
protected $dir = './';

/**
* Undocumented variable
*
* @var string $path
*/
protected $path = './application/models/';

/**
* Undocumented function
*
* @param string $dir
*/
public function __construct($dir)
{
$this->dir = $dir;
}
}

0 comments on commit 5e9a4b8

Please sign in to comment.