コード例 #1
0
ファイル: page.php プロジェクト: icybee/module-pages
 public function __sleep()
 {
     $keys = parent::__sleep();
     // TODO-20130327: is this necessary?
     if (isset($this->template)) {
         $keys['template'] = 'template';
     }
     return $keys;
 }
コード例 #2
0
ファイル: NodeTest.php プロジェクト: icybee/module-nodes
 public function test_updated_at()
 {
     $node = new Node();
     $this->assertInstanceOf('ICanBoogie\\DateTime', $node->updated_at);
     $this->assertTrue($node->updated_at->is_empty);
     $node->updated_at = 'now';
     $this->assertInstanceOf('ICanBoogie\\DateTime', $node->updated_at);
     $this->assertArrayHasKey('updated_at', $node->__sleep());
     $this->assertArrayHasKey('updated_at', $node->to_array());
 }