This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Responsible for hooking views to add each database and its tables. | |
*/ | |
/** | |
* Implements hook_views_data(). | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
/** | |
* 銷售記錄商業邏輯 | |
* Class SellRecordService | |
* @package App | |
*/ | |
class SellRecordService |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function autoload($className) | |
{ | |
if(strpos($className, '\\') === false) { | |
$psr4Paths = [ | |
'MyNamespace\\Alice\\', | |
'MyNamespace\\Joel\\', | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ActiveEagerLoader extends CActiveRecordBehavior | |
{ | |
private $_relationKeys = array(); | |
public function with($keys = array()) | |
{ | |
if(!is_array($keys)) | |
throw new Exception('Only support array type values'); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// protected/components/Joel.php | |
class Joel extends CApplicationComponent | |
{ | |
public $speed = 'Fast'; | |
protected $sex = 'Man'; | |
private $_name; | |
public function setName($name) | |
{ |