コード例 #1
0
ファイル: AbstractUser.php プロジェクト: emrahtoy/concept
 /**
  * @author       Zeki Unal <*****@*****.**>
  * @description
  * @return       User
  */
 protected function performUpdate()
 {
     self::fireModelEvent('updating');
     UserDA::save($this);
     self::fireModelEvent('updated', false);
     return $this;
 }
コード例 #2
0
ファイル: index.php プロジェクト: emrahtoy/concept
include_once '../library/ClassLoader/Loader.php';
$loader = new \ClassLoader\Loader('Concept', '../../vendor');
$loader->register();
$loader = new \ClassLoader\Loader('ExampleProject', '../library');
$loader->register();
/**
 * Bootstrap
 */
$mysql_configurations = array(array('engine' => 'mysql', 'hostname' => 'localhost', 'username' => 'root', 'password' => 'mysql', 'database' => 'test'), 3);
$processor_configurations = array('mysql' => $mysql_configurations);
$processor = new \Concept\Storage\Handler\DataProcess($processor_configurations);
\Concept\Entity\Manager\EntityManager::setHandler($processor);
/**
 * Example
 **/
$user = new User();
$user->setEmail('*****@*****.**');
$user->setFirstName('Zeki');
$user->setLastName('Unal');
$user->setPassword('password');
$user->setUsername('zekiunal');
//$user->save();
//$user->setPassword('password_updated')->save();
$user_1 = \ExampleProject\Custom\Data\UserDA::loadById(2);
$user_1->setPassword('password_updated_2')->save();
dump($user_1);
$filter = new \ExampleProject\Custom\Filter\UserFilter();
$filter->setLimit(10);
$filter->findBy('password', 'password', true);
$user_list = \ExampleProject\Custom\Data\UserDA::load($filter);
dump($user_list);