/** * Чтение данных JSON объекта, результата работы json_decode, * в объект * @param mixed array | stdObject * */ public function fromJSON($arg) { parent::fromJSON($arg); $props = []; if (is_array($arg)) { $props = $arg; } elseif (is_object($arg)) { foreach ($arg as $k => $v) { $props[$k] = $v; } } if (isset($props["autouid"])) { $this->setAutouid($props["autouid"]); } if (isset($props["ID"])) { $this->setID($props["ID"]); } if (isset($props["source"])) { $this->setSource($props["source"]); } if (isset($props["destination"])) { $this->setDestination($props["destination"]); } if (isset($props["dtStart"])) { $this->setDtStart($props["dtStart"]); } if (isset($props["dtEnd"])) { $this->setDtEnd($props["dtEnd"]); } if (isset($props["type"])) { $this->setType($props["type"]); } if (isset($props["comments"])) { $this->setComments($props["comments"]); } if (isset($props["Ref"])) { if (is_array($props["Ref"])) { foreach ($props["Ref"] as $k => $v) { $Ref = \Adaptor_Bindings::create("\\Archive\\Port\\Adaptor\\Data\\Archive\\Refs\\Ref"); $Ref->fromJSON($v); $this->setRef($Ref); } } } }
/** * Чтение данных JSON объекта, результата работы json_decode, * в объект * @param mixed array | stdObject * */ public function fromJSON($arg) { parent::fromJSON($arg); $props = []; if (is_array($arg)) { $props = $arg; } elseif (is_object($arg)) { foreach ($arg as $k => $v) { $props[$k] = $v; } } if (isset($props["autoid"])) { $this->setAutoid($props["autoid"]); } if (isset($props["word"])) { $this->setWord($props["word"]); } if (isset($props["trans"])) { $this->setTrans($props["trans"]); } if (isset($props["desc"])) { $this->setDesc($props["desc"]); } if (isset($props["lastmod"])) { $this->setLastmod($props["lastmod"]); } if (isset($props["Link"])) { if (is_array($props["Link"])) { foreach ($props["Link"] as $k => $v) { $Link = \Adaptor_Bindings::create("\\Lexicon\\Port\\Adaptor\\Data\\Lexicon\\Link"); $Link->fromJSON($v); $this->setLink($Link); } } } }
/** * Чтение данных JSON объекта, результата работы json_decode, * в объект * @param mixed array | stdObject * */ public function fromJSON($arg) { parent::fromJSON($arg); $props = []; if (is_array($arg)) { $props = $arg; } elseif (is_object($arg)) { foreach ($arg as $k => $v) { $props[$k] = $v; } } if (isset($props["x"])) { $this->setX($props["x"]); } if (isset($props["y"])) { $this->setY($props["y"]); } if (isset($props["width"])) { $this->setWidth($props["width"]); } if (isset($props["height"])) { $this->setHeight($props["height"]); } if (isset($props["Ref"])) { if (is_array($props["Ref"])) { foreach ($props["Ref"] as $k => $v) { $Ref = \Adaptor_Bindings::create("\\Archive\\Port\\Adaptor\\Data\\Archive\\Refs\\Ref"); $Ref->fromJSON($v); $this->setRef($Ref); } } } }
/** * Чтение данных JSON объекта, результата работы json_decode, * в объект * @param mixed array | stdObject * */ public function fromJSON($arg) { parent::fromJSON($arg); $props = []; if (is_array($arg)) { $props = $arg; } elseif (is_object($arg)) { foreach ($arg as $k => $v) { $props[$k] = $v; } } if (isset($props["Page"])) { if (is_array($props["Page"])) { foreach ($props["Page"] as $k => $v) { $Page = \Adaptor_Bindings::create("\\Archive\\Port\\Adaptor\\Data\\Archive\\Documents\\Page"); $Page->fromJSON($v); $this->setPage($Page); } } } elseif (array_keys($props) == array_keys(array_keys($props))) { foreach ($props as $v) { $Page = \Adaptor_Bindings::create("\\Archive\\Port\\Adaptor\\Data\\Archive\\Documents\\Page"); $Page->fromJSON($v); $this->setPage($Page); } } }
/** * Чтение данных JSON объекта, результата работы json_decode, * в объект * @param mixed array | stdObject * */ public function fromJSON($arg) { parent::fromJSON($arg); $props = []; if (is_array($arg)) { $props = $arg; } elseif (is_object($arg)) { foreach ($arg as $k => $v) { $props[$k] = $v; } } if (isset($props["Union"])) { if (is_array($props["Union"])) { foreach ($props["Union"] as $k => $v) { $Union = \Adaptor_Bindings::create("\\Archive\\Port\\Adaptor\\Data\\Archive\\Unions\\Union"); $Union->fromJSON($v); $this->setUnion($Union); } } } if (isset($props["Ref"])) { if (is_array($props["Ref"])) { foreach ($props["Ref"] as $k => $v) { $Ref = \Adaptor_Bindings::create("\\Archive\\Port\\Adaptor\\Data\\Archive\\Refs\\Ref"); $Ref->fromJSON($v); $this->setRef($Ref); } } } }
/** * Чтение данных JSON объекта, результата работы json_decode, * в объект * @param mixed array | stdObject * */ public function fromJSON($arg) { parent::fromJSON($arg); $props = []; if (is_array($arg)) { $props = $arg; } elseif (is_object($arg)) { foreach ($arg as $k => $v) { $props[$k] = $v; } } if (isset($props["Session"])) { if (is_array($props["Session"])) { foreach ($props["Session"] as $k => $v) { $Session = \Adaptor_Bindings::create("\\Lexicon\\Port\\Adaptor\\Data\\Lexicon\\Session"); $Session->fromJSON($v); $this->setSession($Session); } } } if (isset($props["Link"])) { if (is_array($props["Link"])) { foreach ($props["Link"] as $k => $v) { $Link = \Adaptor_Bindings::create("\\Lexicon\\Port\\Adaptor\\Data\\Lexicon\\Link"); $Link->fromJSON($v); $this->setLink($Link); } } } }
/** * Чтение данных JSON объекта, результата работы json_decode, * в объект * @param mixed array | stdObject * */ public function fromJSON($arg) { parent::fromJSON($arg); $props = []; if (is_array($arg)) { $props = $arg; } elseif (is_object($arg)) { foreach ($arg as $k => $v) { $props[$k] = $v; } } if (isset($props["name"])) { $this->setName($props["name"]); } if (isset($props["Area"])) { if (is_array($props["Area"])) { foreach ($props["Area"] as $k => $v) { $Area = \Adaptor_Bindings::create("\\Archive\\Port\\Adaptor\\Data\\Archive\\Documents\\Area"); $Area->fromJSON($v); $this->setArea($Area); } } } if (isset($props["Large"])) { $Large = \Adaptor_Bindings::create("\\Archive\\Port\\Adaptor\\Data\\Archive\\Documents\\SideType\\Large"); $Large->fromJSON($props["Large"]); $this->setLarge($Large); } if (isset($props["Thumb"])) { $Thumb = \Adaptor_Bindings::create("\\Archive\\Port\\Adaptor\\Data\\Archive\\Documents\\SideType\\Thumb"); $Thumb->fromJSON($props["Thumb"]); $this->setThumb($Thumb); } }
"\School\Port\Adaptop\Data\Shool\Links"=>new \School\Port\Adaptor\Persistence\PDO\LinkEntityManager(), "\School\Port\Adaptop\Data\Shool\Links\Link"=>new \School\Port\Adaptor\Persistence\PDO\LinkEntityManager(), "default" => new \School\Port\Adaptor\Persistence\PDO\ResourceEntityManager() )); */ $lc->USER_ENTITY_MANAGER_FACTORY = function (\Lexicon\Port\Adaptor\Data\Lexicon\User $entity = NULL) use($lc) { $entity = $entity ? $entity : new \Lexicon\Port\Adaptor\Data\Lexicon\User(); return new \Lexicon\Port\Adaptor\Persistence\PDO\UserEntityManager($lc->locate("DB_CONNECT"), $entity); }; $lc->SESSION_ENTITY_MANAGER_FACTORY = function (\Lexicon\Port\Adaptor\Data\Lexicon\Session $entity = NULL) use($lc) { $entity = $entity ? $entity : new \Lexicon\Port\Adaptor\Data\Lexicon\Session(); return new \Lexicon\Port\Adaptor\Persistence\PDO\SessionEntityManager($lc->locate("DB_CONNECT"), $entity); }; $lc->WORDS_ENTITY_MANAGER_FACTORY = function (\Lexicon\Port\Adaptor\Data\Lexicon\Session $session) use($lc) { return new \Lexicon\Port\Adaptor\Persistence\PDO\WordsEntityManager($lc->locate("DB_CONNECT"), $session); }; $lc->FREQ_DICT_ENTITY_MANAGER_FACTORY = function (\Lexicon\Port\Adaptor\Data\Lexicon\Session $session) use($lc) { return new \Lexicon\Port\Adaptor\Persistence\PDO\FreqEnDictEntityManager($lc->locate("DB_CONNECT"), $session); }; $lc->DICT_ENTITY_MANAGER_FACTORY = function (\Lexicon\Port\Adaptor\Data\Lexicon\Session $session, \Lexicon\Port\Adaptor\Data\Lexicon\Word $entity = NULL) use($lc) { $entity = $entity ? $entity : new \Lexicon\Port\Adaptor\Data\Lexicon\Word(); return new \Lexicon\Port\Adaptor\Persistence\PDO\EnRuDictEntityManager($lc->locate("DB_CONNECT"), $entity); }; $lc->VALIDATION_HANDLER = function () use($lc) { return new \Happymeal\Port\Adaptor\Data\ValidationHandler(); }; /* classes binding */ \Adaptor_Bindings::setClassMapping(array()); //$token = bin2hex( mcrypt_create_iv( 128, MCRYPT_DEV_RANDOM ) ); //error_log($t); //error_log( isset( $_SERVER["REMOTE_USER"] ) ? $_SERVER["REMOTE_USER"] : "******" );
/** * Чтение данных JSON объекта, результата работы json_decode, * в объект * @param mixed array | stdObject * */ public function fromJSON($arg) { parent::fromJSON($arg); $props = []; if (is_array($arg)) { $props = $arg; } elseif (is_object($arg)) { foreach ($arg as $k => $v) { $props[$k] = $v; } } if (isset($props["Word"])) { $Word = \Adaptor_Bindings::create("\\Lexicon\\Port\\Adaptor\\Data\\Lexicon\\Word"); $Word->fromJSON($props["Word"]); $this->setWord($Word); } if (isset($props["Session"])) { $Session = \Adaptor_Bindings::create("\\Lexicon\\Port\\Adaptor\\Data\\Lexicon\\Session"); $Session->fromJSON($props["Session"]); $this->setSession($Session); } }
/** * Чтение данных JSON объекта, результата работы json_decode, * в объект * @param mixed array | stdObject * */ public function fromJSON($arg) { parent::fromJSON($arg); $props = []; if (is_array($arg)) { $props = $arg; } elseif (is_object($arg)) { foreach ($arg as $k => $v) { $props[$k] = $v; } } if (isset($props["autouid"])) { $this->setAutouid($props["autouid"]); } if (isset($props["ID"])) { $this->setID($props["ID"]); } if (isset($props["fullName"])) { $this->setFullName($props["fullName"]); } if (isset($props["initials"])) { $this->setInitials($props["initials"]); } if (isset($props["middleNames"])) { $this->setMiddleNames($props["middleNames"]); } if (isset($props["firstName"])) { $this->setFirstName($props["firstName"]); } if (isset($props["lastName"])) { $this->setLastName($props["lastName"]); } if (isset($props["esq"])) { $this->setEsq($props["esq"]); } if (isset($props["deceased"])) { $this->setDeceased($props["deceased"]); } if (isset($props["DOB"])) { $this->setDOB($props["DOB"]); } if (isset($props["rollNo"])) { $this->setRollNo($props["rollNo"]); } if (isset($props["no"])) { $this->setNo($props["no"]); } if (isset($props["league"])) { $this->setLeague($props["league"]); } if (isset($props["comments"])) { $this->setComments($props["comments"]); } if (isset($props["Ref"])) { if (is_array($props["Ref"])) { foreach ($props["Ref"] as $k => $v) { $Ref = \Adaptor_Bindings::create("\\Archive\\Port\\Adaptor\\Data\\Archive\\Refs\\Ref"); $Ref->fromJSON($v); $this->setRef($Ref); } } } if (isset($props["Link"])) { $Link = \Adaptor_Bindings::create("\\Archive\\Port\\Adaptor\\Data\\Archive\\Links\\Link"); $Link->fromJSON($props["Link"]); $this->setLink($Link); } }
/** * Чтение данных JSON объекта, результата работы json_decode, * в объект * @param mixed array | stdObject * */ public function fromJSON($arg) { parent::fromJSON($arg); $props = []; if (is_array($arg)) { $props = $arg; } elseif (is_object($arg)) { foreach ($arg as $k => $v) { $props[$k] = $v; } } if (isset($props["Persons"])) { $Persons = \Adaptor_Bindings::create("\\Archive\\Port\\Adaptor\\Data\\Archive\\Persons"); $Persons->fromJSON($props["Persons"]); $this->setPersons($Persons); } if (isset($props["Unions"])) { $Unions = \Adaptor_Bindings::create("\\Archive\\Port\\Adaptor\\Data\\Archive\\Unions"); $Unions->fromJSON($props["Unions"]); $this->setUnions($Unions); } if (isset($props["Documents"])) { $Documents = \Adaptor_Bindings::create("\\Archive\\Port\\Adaptor\\Data\\Archive\\Documents"); $Documents->fromJSON($props["Documents"]); $this->setDocuments($Documents); } if (isset($props["Events"])) { $Events = \Adaptor_Bindings::create("\\Archive\\Port\\Adaptor\\Data\\Archive\\Events"); $Events->fromJSON($props["Events"]); $this->setEvents($Events); } }
public static function setClassMapping($classMapping) { self::$classMapping = $classMapping; }
/** * Чтение данных JSON объекта, результата работы json_decode, * в объект * @param mixed array | stdObject * */ public function fromJSON($arg) { parent::fromJSON($arg); $props = []; if (is_array($arg)) { $props = $arg; } elseif (is_object($arg)) { foreach ($arg as $k => $v) { $props[$k] = $v; } } if (isset($props["autouid"])) { $this->setAutouid($props["autouid"]); } if (isset($props["ID"])) { $this->setID($props["ID"]); } if (isset($props["name"])) { $this->setName($props["name"]); } if (isset($props["founded"])) { $this->setFounded($props["founded"]); } if (isset($props["type"])) { $this->setType($props["type"]); } if (isset($props["comments"])) { $this->setComments($props["comments"]); } if (isset($props["Link"])) { $Link = \Adaptor_Bindings::create("\\Archive\\Port\\Adaptor\\Data\\Archive\\Links\\Link"); $Link->fromJSON($props["Link"]); $this->setLink($Link); } if (isset($props["Ref"])) { if (is_array($props["Ref"])) { foreach ($props["Ref"] as $k => $v) { $Ref = \Adaptor_Bindings::create("\\Archive\\Port\\Adaptor\\Data\\Archive\\Refs\\Ref"); $Ref->fromJSON($v); $this->setRef($Ref); } } } }
/** * Чтение данных JSON объекта, результата работы json_decode, * в объект * @param mixed array | stdObject * */ public function fromJSON($arg) { parent::fromJSON($arg); $props = []; if (is_array($arg)) { $props = $arg; } elseif (is_object($arg)) { foreach ($arg as $k => $v) { $props[$k] = $v; } } if (isset($props["name"])) { $this->setName($props["name"]); } if (isset($props["comments"])) { $this->setComments($props["comments"]); } if (isset($props["Obverse"])) { $Obverse = \Adaptor_Bindings::create("\\Archive\\Port\\Adaptor\\Data\\Archive\\Documents\\Page\\Obverse"); $Obverse->fromJSON($props["Obverse"]); $this->setObverse($Obverse); } if (isset($props["Reverse"])) { $Reverse = \Adaptor_Bindings::create("\\Archive\\Port\\Adaptor\\Data\\Archive\\Documents\\Page\\Reverse"); $Reverse->fromJSON($props["Reverse"]); $this->setReverse($Reverse); } }
/** * Чтение данных JSON объекта, результата работы json_decode, * в объект * @param mixed array | stdObject * */ public function fromJSON($arg) { parent::fromJSON($arg); $props = []; if (is_array($arg)) { $props = $arg; } elseif (is_object($arg)) { foreach ($arg as $k => $v) { $props[$k] = $v; } } if (isset($props["autouid"])) { $this->setAutouid($props["autouid"]); } if (isset($props["ID"])) { $this->setID($props["ID"]); } if (isset($props["type"])) { $this->setType($props["type"]); } if (isset($props["year"])) { $this->setYear($props["year"]); } if (isset($props["path"])) { $this->setPath($props["path"]); } if (isset($props["published"])) { $this->setPublished($props["published"]); } if (isset($props["readiness"])) { $this->setReadiness($props["readiness"]); } if (isset($props["comments"])) { $this->setComments($props["comments"]); } if (isset($props["Page"])) { if (is_array($props["Page"])) { foreach ($props["Page"] as $k => $v) { $Page = \Adaptor_Bindings::create("\\Archive\\Port\\Adaptor\\Data\\Archive\\Documents\\Page"); $Page->fromJSON($v); $this->setPage($Page); } } } if (isset($props["Link"])) { $Link = \Adaptor_Bindings::create("\\Archive\\Port\\Adaptor\\Data\\Archive\\Links\\Link"); $Link->fromJSON($props["Link"]); $this->setLink($Link); } if (isset($props["Ref"])) { if (is_array($props["Ref"])) { foreach ($props["Ref"] as $k => $v) { $Ref = \Adaptor_Bindings::create("\\Archive\\Port\\Adaptor\\Data\\Archive\\Refs\\Ref"); $Ref->fromJSON($v); $this->setRef($Ref); } } } }
/** * Чтение данных JSON объекта, результата работы json_decode, * в объект * @param mixed array | stdObject * */ public function fromJSON($arg) { parent::fromJSON($arg); $props = []; if (is_array($arg)) { $props = $arg; } elseif (is_object($arg)) { foreach ($arg as $k => $v) { $props[$k] = $v; } } if (isset($props["userId"])) { $this->setUserId($props["userId"]); } if (isset($props["code"])) { $this->setCode($props["code"]); } if (isset($props["dtStart"])) { $this->setDtStart($props["dtStart"]); } if (isset($props["used"])) { $this->setUsed($props["used"]); } if (isset($props["nextRule"])) { $this->setNextRule($props["nextRule"]); } if (isset($props["repeatRule"])) { $this->setRepeatRule($props["repeatRule"]); } if (isset($props["repeatCounter"])) { $this->setRepeatCounter($props["repeatCounter"]); } if (isset($props["attempts"])) { $this->setAttempts($props["attempts"]); } if (isset($props["lastmod"])) { $this->setLastmod($props["lastmod"]); } if (isset($props["Word"])) { if (is_array($props["Word"])) { foreach ($props["Word"] as $k => $v) { $Word = \Adaptor_Bindings::create("\\Lexicon\\Port\\Adaptor\\Data\\Lexicon\\Session\\Word"); $Word->fromJSON($v); $this->setWord($Word); } } } if (isset($props["last"])) { if (is_array($props["last"])) { $this->setLastArray($props["last"]); } } if (isset($props["Link"])) { if (is_array($props["Link"])) { foreach ($props["Link"] as $k => $v) { $Link = \Adaptor_Bindings::create("\\Lexicon\\Port\\Adaptor\\Data\\Lexicon\\Link"); $Link->fromJSON($v); $this->setLink($Link); } } } }