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
| <?php | |
| /** | |
| * Return accept languages | |
| * @return array | |
| * | |
| * HTTP content negotiation (section 12) uses short "floating point" numbers to indicate the | |
| * relative importance ("weight") of various negotiable parameters. A weight is normalized to | |
| * a real number in the range 0 through 1, where 0 is the minimum and 1 the maximum value. | |
| * If a parameter has a quality value of 0, then content with this parameter is `not acceptable' | |
| * for the client. HTTP/1.1 applications MUST NOT generate more than three digits after the |
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
| 【K&R】 | |
| function(...) | |
| { | |
| } | |
| if (...) { |
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
| . | |
| ├── src | |
| │ └── MyCompany | |
| │ └── AppBundle | |
| │ ├── Command | |
| │ └── Controller | |
| └── vendor | |
| └── MyCompany | |
| ├── DataSourceModule1 | |
| │ ├── ExternalService |
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
| <?php | |
| class Foo | |
| { | |
| private $foo = 'bar'; | |
| public function generate() | |
| { | |
| return function() { | |
| return $this->foo; |
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
| <?php | |
| class Foo | |
| { | |
| public function __construct() | |
| { | |
| $this->value = __CLASS__; | |
| } | |
| } |
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
| <?php | |
| class Assertion | |
| { | |
| private $assertion; | |
| private $valiator; | |
| public function __construct($assertion, callable $validator) | |
| { |
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
| fields: | |
| name: | |
| type: string | |
| label: "契約者名" | |
| uname: | |
| type: string | |
| lablel: "ユーザ名" | |
| email: | |
| type: string | |
| label: "メールアドレス" |
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
| <?php | |
| $date1 = new DateTime('@999994149'); | |
| $date2 = (new DateTime)->setTimestamp(999994149); | |
| var_dump($date1->getTimestamp()); | |
| var_dump($date2->getTimestamp()); | |
| $diff = $date1->diff($date2); |
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
| <?php | |
| namespace XCore\Entity; | |
| class User | |
| { | |
| // 元XoopsUserクラス | |
| } | |
| class Module |
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 Test { | |
| public static void main(String[] args) { | |
| UserRepository userRepository = new UserRepository(); | |
| userRepository.persist(new Object()); | |
| userRepository.persist(new User()); | |
| } | |
| } | |
| class Repository | |
| { |