Created
June 11, 2015 09:30
-
-
Save tadasuke/f2290cc29529bebd6fe7 to your computer and use it in GitHub Desktop.
Eclipse PDOで配列内のオブジェクトをコード補完する ref: http://qiita.com/tadasuke/items/e5d9072dbae5677ed234
This file contains hidden or 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
/** | |
* hogeオブジェクト配列 | |
* @var array | |
*/ | |
private $hogeArray = array(); | |
public function getHogeArray() { | |
return $this -> hogeArray; | |
} |
This file contains hidden or 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
$fuga = new fuga(); | |
foreach ( $fuga -> getHogeArray() as $hoge ) { | |
$hoge -> ge | |
} |
This file contains hidden or 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
/** | |
* hogeオブジェクト配列 | |
* @var array[hoge] | |
*/ | |
private $hogeArray = array(); | |
public function getHogeArray() { | |
return $this -> hogeArray; | |
} |
This file contains hidden or 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
class hoge { | |
private $id = NULL; | |
public function setId( $id ) { | |
$this -> id = $id; | |
} | |
public function getId() { | |
return $this -> id; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment