コード例 #1
0
 public static function initialize(array $config)
 {
     if (null === static::$instance) {
         static::$instance = new static($config);
     }
     Entity::registerClient(static::$instance);
 }
コード例 #2
0
 public function save($raw = false)
 {
     // Email has unique validator.
     // If value passed is same as what's already in database, validator will fail.
     // Unset email param if same as in db
     if (isset($this->id) && isset($this->email)) {
         $teamValidation = Customer::getByID($this->id);
         if ($teamValidation->email == $this->email) {
             unset($this->email);
         }
     }
     return parent::save($raw);
 }