Skip to content

Instantly share code, notes, and snippets.

@tadasuke
Created June 11, 2015 09:30
Show Gist options
  • Save tadasuke/f2290cc29529bebd6fe7 to your computer and use it in GitHub Desktop.
Save tadasuke/f2290cc29529bebd6fe7 to your computer and use it in GitHub Desktop.
Eclipse PDOで配列内のオブジェクトをコード補完する ref: http://qiita.com/tadasuke/items/e5d9072dbae5677ed234
/**
* hogeオブジェクト配列
* @var array
*/
private $hogeArray = array();
public function getHogeArray() {
return $this -> hogeArray;
}
$fuga = new fuga();
foreach ( $fuga -> getHogeArray() as $hoge ) {
$hoge -> ge
}
/**
* hogeオブジェクト配列
* @var array[hoge]
*/
private $hogeArray = array();
public function getHogeArray() {
return $this -> hogeArray;
}
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