Answer the question
In order to leave comments, you need to log in
How to properly name and where to store files with interfaces?
I am programming in PHP.
When developing the system, I ran into the question of where to store and how to name files with interfaces.
There are two approaches (with and without "Interface"):
namespace Illuminate\Contracts\Auth\Access;
interface Authorizable
{
/**
* Determine if the entity has a given ability.
*
* @param string $ability
* @param array|mixed $arguments
* @return bool
*/
public function can($ability, $arguments = []);
}
namespace Symfony\Component\Translation\Dumper;
use Symfony\Component\Translation\MessageCatalogue;
interface DumperInterface
{
/**
* Dumps the message catalogue.
*
* @param MessageCatalogue $messages The message catalogue
* @param array $options Options that are used by the dumper
*/
public function dump(MessageCatalogue $messages, $options = array());
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question